Closed DomGaud closed 7 years ago
I confirm the same issue with nativescript@2.2.0
and nativescript-angular@0.3.0
I'm still having issues because of the hardcoded version of com.google.android.gms:play-services-analytics
.
Today, my issue was something missing with com.google.android.gms.internal.zzadz
.
I'll send a PR with that.
Update (below the details of the error)
The full error is on terminal:
Note: Recompile with -Xlint:deprecation for details.
:compileF0F1F2F3F4F5F6F7F8F9F10DebugNdk UP-TO-DATE
:compileF0F1F2F3F4F5F6F7F8F9F10DebugSources
:buildMetadata
Skip com.google.android.gms.internal.zzadz
Error: java.lang.NullPointerException
Skip com.google.android.gms.internal.zzadz$zza
Error: java.lang.NullPointerException
Skip com.google.android.gms.internal.zzadz$zzb
Error: java.lang.NullPointerException
Skip com.google.android.gms.internal.zzt
Error: java.lang.NullPointerException
Skip com.google.android.gms.internal.zzw
Error: java.lang.NullPointerException
Skip com.google.android.gms.internal.zzy
Error: java.lang.NullPointerException
Skip com.google.android.gms.internal.zzz
Error: java.lang.NullPointerException
Skip com.google.android.gms.tagmanager.zzag
Error: java.lang.NullPointerException
Skip com.google.android.gms.tagmanager.zzbi
Error: java.lang.NullPointerException
Skip com.google.android.gms.tagmanager.zzch
Error: java.lang.NullPointerException
Skip com.google.android.gms.tagmanager.zzdl
Error: java.lang.NullPointerException
Skip com.google.android.gms.tagmanager.zzdm
Error: java.lang.NullPointerException
Skip com.squareup.picasso.OkHttpDownloader
Error: java.lang.NullPointerException
'assets/metadata/treeNodeStream.dat' NOT FOUND
'assets/metadata/treeStringsStream.dat' NOT FOUND
'assets/metadata/treeValueStream.dat' NOT FOUND
'assets/metadata/treeNodeStream.dat'...
'assets/metadata/treeStringsStream.dat'...
'assets/metadata/treeValueStream.dat'...
:prePackageMarkerForF0F1F2F3F4F5F6F7F8F9F10Debug
:transformClassesWithDexForF0F1F2F3F4F5F6F7F8F9F10Debug
On my app, we use Webpack, so the error is from the bundled file:
java.lang.RuntimeException: Unable to start activity ComponentInfo{au.com.ourappid/com.tns.NativeScriptActivity}: com.tns.NativeScriptException:
Calling js method onCreate failed
Error: java.lang.NoSuchMethodError: No static method zzaa(Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzab; or its super classes (declaration of 'com.google.android.gms.common.internal.zzab' appears in /data/app/au.com.ourappid/base.apk)
com.google.android.gms.analytics.internal.zzf.zzay(Unknown Source)
com.google.android.gms.analytics.GoogleAnalytics.getInstance(Unknown Source)
com.tns.Runtime.callJSMethodNative(Native Method)
com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:865)
com.tns.Runtime.callJSMethodImpl(Runtime.java:730)
com.tns.Runtime.callJSMethod(Runtime.java:716)
com.tns.Runtime.callJSMethod(Runtime.java:697)
com.tns.Runtime.callJSMethod(Runtime.java:687)
com.tns.NativeScriptActivity.onCreate(android.app.Activity.java)
android.app.Activity.performCreate(Activity.java:6237)
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
android.app.ActivityThread.-wrap11(ActivityThread.java)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:148)
android.app.ActivityThread.main(ActivityThread.java:5417)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
File: "/data/data/au.com.ourappid/files/app/tns-java-classes.js, line: 29237, column: 68
StackTrace:
Frame: function:'exports.initalize', file:'/data/data/au.com.ourappid/files/app/tns-java-classes.js', line: 29237, column: 69
Frame: function:'', file:'/data/data/au.com.ourappid/files/app/bundle.js', line: 72046, column: 26
Frame: function:'Observable.notify', file:'/data/data/au.com.ourappid/files/app/tns-java-classes.js', line: 5878, column: 24
Frame: function:'ActivityCallbacksImplementation.onCreate', file:'/data/data/au.com.ourappid/files/app/tns-java-classes.js', line: 1471, column: 22
Frame: function:'NativeScriptActivity.onCreate', file:'/data/data/au.com.ourappid/files/app/tns-java-classes.js', line: 32462, column: 26
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: com.tns.NativeScriptException:
Calling js method onCreate failed
Error: java.lang.NoSuchMethodError: No static method zzaa(Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzab; or its super classes (declaration of 'com.google.android.gms.common.internal.zzab' appears in /data/app/au.com.ourappid-1/base.apk)
com.google.android.gms.analytics.internal.zzf.zzay(Unknown Source)
com.google.android.gms.analytics.GoogleAnalytics.getInstance(Unknown Source)
com.tns.Runtime.callJSMethodNative(Native Method)
com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:865)
com.tns.Runtime.callJSMethodImpl(Runtime.java:730)
com.tns.Runtime.callJSMethod(Runtime.java:716)
com.tns.Runtime.callJSMethod(Runtime.java:697)
com.tns.Runtime.callJSMethod(Runtime.java:687)
com.tns.NativeScriptActivity.onCreate(android.app.Activity.java)
android.app.Activity.performCreate(Activity.java:6237)
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
android.app.ActivityThread.-wrap11(ActivityThread.java)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:148)
android.app.ActivityThread.main(ActivityThread.java:5417)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
File: "/data/data/au.com.ourappid/files/app/tns-java-classes.js, line: 29237, column: 68
StackTrace:
Frame: function:'exports.initalize', file:'/data/data/au.com.ourappid/files/app/tns-java-classes.js', line: 29237, column: 69
Frame: function:'', file:'/data/data/au.com.ourappid/files/app/bundle.js', line: 72046, column: 26
Frame: function:'Observable.notify', file:'/data/data/au.com.ourappid/files/app/tns-java-classes.js', line: 5878, column: 24
Frame: function:'ActivityCallbacksImplementation.onCreate', file:'/data/data/au.com.ourappid/files/app/tns-java-classes.js', line: 1471, column: 22
Frame: function:'NativeScriptActivity.onCreate', file:'/data/data/au.com.ourappid/files/app/tns-java-classes.js', line: 32462, column: 26
at com.tns.Runtime.callJSMethodNative(Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:865)
at com.tns.Runtime.callJSMethodImpl(Runtime.java:730)
at com.tns.Runtime.callJSMethod(Runtime.java:716)
at com.tns.Runtime.callJSMethod(Runtime.java:697)
at com.tns.Runtime.callJSMethod(Runtime.java:687)
at com.tns.NativeScriptActivity.onCreate(android.app.Activity.java)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
... 9 more
Caused by: java.lang.NoSuchMethodError: No static method zzaa(Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzab; or its super classes (declaration of 'com.google.android.gms.common.internal.zzab' appears in /data/app/au.com.ourappid-1/base.apk)
at com.google.android.gms.analytics.internal.zzf.zzay(Unknown Source)
at com.google.android.gms.analytics.GoogleAnalytics.getInstance(Unknown Source)
... 19 more
When building for Android using v0.2.9 the following error occurs:
To resolve this I changed the following line in the include.gradle file:
compile 'com.google.android.gms:play-services-analytics:9.2.0'
tocompile 'com.google.android.gms:play-services-analytics:+
Note: iOS runs with no errors.