davide-scalzo / react-native-mixpanel

A React Native wrapper for Mixpanel tracking
MIT License
455 stars 195 forks source link

Error in Android. Deprecated API #129

Closed JJMoon closed 6 years ago

JJMoon commented 6 years ago

I am using 0.0.16 version.

In Android Studio, there are debugging build errors as follows.

Error:Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Volumes/Data/Repo/moin-mobile/node_modules/react-native-device-info/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/Volumes/Data/Repo/moin-mobile/node_modules/react-native-mixpanel/android/src/main/java/com/kevinejohn/RNMixpanel/RNMixpanelModule.java:272: warning: non-varargs call of varargs method with inexact argument type for last parameter;
            callback.invoke(prop);
                            ^
  cast to Object for a varargs call
  cast to Object[] for a non-varargs call and to suppress this warning
/Volumes/Data/Repo/moin-mobile/node_modules/react-native-mixpanel/android/src/main/java/com/kevinejohn/RNMixpanel/RNMixpanelModule.java:275: warning: non-varargs call of varargs method with inexact argument type for last parameter;
            callback.invoke(prop);
                            ^
  cast to Object for a varargs call
  cast to Object[] for a non-varargs call and to suppress this warning
2 warnings
Note: /Volumes/Data/Repo/moin-mobile/node_modules/react-native-onesignal/android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

* 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

Assemble Release is done, but the app crashes. I am not sure this is the cause of crashing.

react-native : v0.53.3

JJMoon commented 6 years ago

Solved. Actually the crash was caused by upgrading of Google services. All google services was upgraded yesterday, it caused crash with same git repo. So, I changed the firebase, google-message ... version in gradle files, and the crash was cured. I learned a lesson.