Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Troubleshooting

Christian Brevik edited this page Nov 6, 2016 · 7 revisions

Google Analytics Logging

There is a divergence in how the iOS and Android versions of the native library handles logging.

For Android you can check the GA logs with your favorite terminal by using adb logcat.

For iOS there is a logger in the internal library that writes events to the XCode output window. In order to control the logLevel you can add an item in your Info.plist with the key GAILogLevel. The value you use is a number which corresponds to your desired log-level:

  • 0: None
  • 1: Errors
  • 2: Warnings
  • 3: Info
  • 4: Verbose

Android build problem

Some people have had problems being hit with Unknown source file : com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzmu; after installing this (or similar modules).

This might be because you are using another module which also uses play-services, but targets a different version of play-services. In the build.gradle-file of this module, we target com.google.android.gms:play-services-analytics:8.+. In other words, we try to use the latest (9.x.x) version of play-services.

If some other module is targetting a previous version, say 8.3.0, then adding the following to your (React Native-project) build.gradle may be helpful:

compile("com.google.android.gms:play-services-analytics:8.3.0"){
    force = true
}

That should force the app to compile the 8.3.0 version of the dependency my module uses. Obviously, this might not be a solution if several modules are depending on conflicting versions.

I would recommend other module authors which also depend on play-services to target 9.+ instead of a specific minor version.

Clone this wiki locally