Collect: Cannot resolve symbol 'global_tracker' in Collect.java

Created on 25 Jan 2019  路  10Comments  路  Source: getodk/collect

tracker = analytics.newTracker(R.xml.global_tracker);

All 10 comments

I am to facing same error when trying to build in Editor.
Am I missing something ??

The global_tracker file is generated automatically. Please try to Build->Clean Project and Build->Rebuild Project and let us know if it helps.

I tried as the suggestion but the problem remains the same. The symbol is not resolved even after clean and rebuild of project.
global_tracker_err

What about you @awemulya? You gave thumbs up so it helped I guess?

This is my stack Trace
`FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':collect_app:transformClassesWithInstantRunForDebug'.

    com.android.build.api.transform.TransformException: java.lang.IllegalStateException: java.lang.IllegalStateException

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 5m 23s
37 actionable tasks: 22 executed, 15 up-to-date`

My thumbs up is for your quick support. I am getting the same error. as @ManojPandey121

@ManojPandey121 that log is a completely different issue, disable instant run and try again
instant

And this worked for me. Thank you @nishontan dai.

Great so we can close.

I am getting the same issue. I tried both @grzesiek2010's solution https://github.com/opendatakit/collect/issues/2827#issuecomment-457536987 and @nishontan's solution https://github.com/opendatakit/collect/issues/2827#issuecomment-457536987 but nothing seems to work. R.xml.global_tracker is still throwing the message:

Cannot resolve symbol 'global_tracker'

Was this page helpful?
0 / 5 - 0 ratings