Not working NativeScript Geolocation ater I add nativescript-google-maps-sdk


#1

Hi
I use NativeScript Geolocation well. But after I add nativescript-google-maps-sdk I got error on different page where I added map.

I got error:
Cannot enable the location service. Error: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzbck;
com.tns.Runtime.callJSMethodNative(Native Method)
com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1088)
com.tns.Runtime.callJSMethodImpl(Runtime.java:970)
com.tns.Runtime.callJSMethod(Runtime.java:957)
com.tns.Runtime.callJSMethod(Runtime.java:941)
com.tns.Runtime.callJSMethod(Runtime.java:933)
com.tns.NativeScriptActivity.onRequestPermissionsResult(NativeScriptActivity.java:67)
android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7429)
android.app.Activity.dispatchActivityResult(Activity.java:7280)
android.app.ActivityThread.deliverResults(ActivityThread.java:4264)
android.app.ActivityThread.handleSendResult(ActivityThread.java:4312)
android.app.ActivityThread.-wrap19(Unknown Source:0)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1644)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:164)
android.app.ActivityThread.main(ActivityThread.java:6494)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.ClassNotFoundException: Didn’t find class “com.google.android.gms.internal.zzbck” on path: DexPathList[[zip file “/data/app/org.nativescript.SkautISmobile-k8u3wX7l9rkBkfnzkKq5Pw==/base.apk”],nativeLibraryDirectories=[/data/app/org.nativescript.SkautISmobile-k8u3wX7l9rkBkfnzkKq5Pw==/lib/x86, /data/app/org.nativescript.SkautISmobile-k8u3wX7l9rkBkfnzkKq5Pw==/base.apk!/lib/x86, /system/lib, /vendor/lib]]
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
java.lang.ClassLoader.loadClass(ClassLoader.java:379)
java.lang.ClassLoader.loadClass(ClassLoader.java:312)
com.tns.Runtime.callJSMethodNative(Native Method)
com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1088)
com.tns.Runtime.callJSMethodImpl(Runtime.java:970)
com.tns.Runtime.callJSMethod(Runtime.java:957)
com.tns.Runtime.callJSMethod(Runtime.java:941)
com.tns.Runtime.callJSMethod(Runtime.java:933)
com.tns.NativeScriptActivity.onRequestPermissionsResult(NativeScriptActivity.java:67)
android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7429)
android.app.Activity.dispatchActivityResult(Activity.java:7280)
android.app.ActivityThread.deliverResults(ActivityThread.java:4264)
android.app.ActivityThread.handleSendResult(ActivityThread.java:4312)
android.app.ActivityThread.-wrap19(Unknown Source:0)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1644)
android.os.Handler.dispatchMessage(Handler.java:106)
android.os.Looper.loop(Looper.java:164)
android.app.ActivityThread.main(ActivityThread.java:6494)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

in code:

 let location = geolocation.getCurrentLocation({ desiredAccuracy: Accuracy.high, timeout: 2000 })
        .then(function (loc) {
            console.dir(loc)
        }, function (e) {
            console.log("Error: " + (e.message || e)); //The error is printed from here
        });

#2

Ok, I solved it yet by removing all platform, hooks and node_module ant install again…