Flutter-geolocator: App Crash when getting location

Created on 10 Jul 2019  ·  3Comments  ·  Source: Baseflow/flutter-geolocator

hiPj6BLpAj

Output:
`W/m.example.clim( 5174): Verification of boolean com.google.android.gms.common.GoogleApiAvailabilityLight.isUserResolvableError(int) took 114.579ms
E/flutter ( 5174): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(40)] java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/ArraySet;
E/flutter ( 5174): at com.google.android.gms.common.api.internal.GoogleApiManager.(Unknown Source:29)
E/flutter ( 5174): at com.google.android.gms.common.api.internal.GoogleApiManager.zab(Unknown Source:8)
E/flutter ( 5174): at com.google.android.gms.common.api.GoogleApi.(Unknown Source:44)
E/flutter ( 5174): at com.google.android.gms.common.api.GoogleApi.(Unknown Source:53)
E/flutter ( 5174): at com.google.android.gms.location.FusedLocationProviderClient.(Unknown Source:8)
E/flutter ( 5174): at com.google.android.gms.location.LocationServices.getFusedLocationProviderClient(Unknown Source:2)
E/flutter ( 5174): at com.baseflow.geolocator.tasks.LocationUpdatesUsingLocationServicesTask.(LocationUpdatesUsingLocationServicesTask.java:29)
E/flutter ( 5174): at com.baseflow.geolocator.tasks.TaskFactory.createCurrentLocationTask(TaskFactory.java:44)
E/flutter ( 5174): at com.baseflow.geolocator.GeolocatorPlugin.onMethodCall(GeolocatorPlugin.java:66)
E/flutter ( 5174): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:201)
E/flutter ( 5174): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:88)
E/flutter ( 5174): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:219)
E/flutter ( 5174): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter ( 5174): at android.os.MessageQueue.next(MessageQueue.java:326)
E/flutter ( 5174): at android.os.Looper.loop(Looper.java:160)
E/flutter ( 5174): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/flutter ( 5174): at java.lang.reflect.Method.invoke(Native Method)
E/flutter ( 5174): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/flutter ( 5174): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
E/flutter ( 5174): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.ArraySet" on path: DexPathList[[zip file "/data/app/com.example.clima-IcdujdRk59jlUr8JPfel9g==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.clima-IcdujdRk59jlUr8JPfel9g==/lib/x86, /data/app/com.example.clima-IcdujdRk59jlUr8JPfel9g==/base.apk!/lib/x86, /system/lib]]
E/flutter ( 5174): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
E/flutter ( 5174): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/flutter ( 5174): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/flutter ( 5174): ... 19 more
E/flutter ( 5174):
F/flutter ( 5174): [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(77)] Check failed: CheckException(env).
F/libc ( 5174): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 5174 (m.example.clima), pid 5174 (m.example.clima)


Build fingerprint: 'google/sdk_gphone_x86/generic_x86:9/PSR1.180720.093/5456446:userdebug/dev-keys'
Revision: '0'
ABI: 'x86'
pid: 5174, tid: 5174, name: m.example.clima >>> com.example.clima <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(77)] Check failed: CheckException(env).
'
eax 00000000 ebx 00001436 ecx 00001436 edx 00000006
edi 00001436 esi 00000070
ebp ffd88808 esp ffd887a8 eip ec275b39
backtrace:
#00 pc 00000b39 [vdso:ec275000] (__kernel_vsyscall+9)
#01 pc 0001fdf8 /system/lib/libc.so (syscall+40)
#02 pc 00022ed3 /system/lib/libc.so (abort+115)
#03 pc 00c575d7 /data/app/com.example.clima-IcdujdRk59jlUr8JPfel9g==/lib/x86/libflutter.so (offset 0xc3d000)
#04 pc 00c469ab /data/app/com.example.clima-IcdujdRk59jlUr8JPfel9g==/lib/x86/libflutter.so (offset 0xc3d000)
#05 pc 00c447a8 /data/app/com.example.clima-IcdujdRk59jlUr8JPfel9g==/lib/x86/libflutter.so (offset 0xc3d000)
#06 pc 00c9e921 /data/app/com.example.clima-IcdujdRk59jlUr8JPfel9g==/lib/x86/libflutter.so (offset 0xc3d000)
#07 pc 00c5851f /data/app/com.example.clima-IcdujdRk59jlUr8JPfel9g==/lib/x86/libflutter.so (offset 0xc3d000)
#08 pc 00c583f0 /data/app/com.example.clima-IcdujdRk59jlUr8JPfel9g==/lib/x86/libflutter.so (offset 0xc3d000)
#09 pc 00c5820e /data/app/com.example.clima-IcdujdRk59jlUr8JPfel9g==/lib/x86/libflutter.so (offset 0xc3d000)
#10 pc 00c5d378 /data/app/com.example.clima-IcdujdRk59jlUr8JPfel9g==/lib/x86/libflutter.so (offset 0xc3d000)
#11 pc 00c5d3a6 /data/app/com.example.clima-IcdujdRk59jlUr8JPfel9g==/lib/x86/libflutter.so (offset 0xc3d000)
#12 pc 00012a77 /system/lib/libutils.so (android::SimpleLooperCallback::handleEvent(int, int, void)+39)
#13 pc 00013896 /system/lib/libutils.so (android::Looper::pollInner(int)+998)
#14 pc 0001340b /system/lib/libutils.so (android::Looper::pollOnce(int, int
, int, void)+43)
#15 pc 000e414b /system/lib/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv
, _jobject, long long, int)+59)
#16 pc 003ddb28 /system/framework/x86/boot-framework.oat (offset 0x3ca000) (android.media.MediaExtractor.seekTo [DEDUPED]+136)
#17 pc 005f0b82 /system/lib/libart.so (art_quick_invoke_stub+338)
#18 pc 000a30ce /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread
, unsigned int, unsigned int, art::JValue, char const)+222)
#19 pc 0029bca2 /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread
, art::ArtMethod, art::ShadowFrame, unsigned short, art::JValue)+338)
#20 pc 00293e48 /system/lib/libart.so (bool art::interpreter::DoCall(art::ArtMethod
, art::Thread, art::ShadowFrame&, art::Instruction const, unsigned short, art::JValue)+1048)
#21 pc 005bda66 /system/lib/libart.so (MterpInvokeDirect+342)
#22 pc 005e2e21 /system/lib/libart.so (ExecuteMterpImpl+14497)
#23 pc 00aeae98 /system/framework/boot-framework.vdex (android.os.MessageQueue.next+38)
#24 pc 00266216 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2093054539+598)
#25 pc 0026c79c /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread
, art::CodeItemDataAccessor const&, art::ShadowFrame, art::JValue)+220)
#26 pc 00293e2b /system/lib/libart.so (bool art::interpreter::DoCall(art::ArtMethod, art::Thread, art::ShadowFrame&, art::Instruction const, unsigned short, art::JValue)+1019)
#27 pc 005bc493 /system/lib/libart.so (MterpInvokeVirtual+691)
#28 pc 005e2d21 /system/lib/libart.so (ExecuteMterpImpl+14241)
#29 pc 00aea944 /system/framework/boot-framework.vdex (android.os.Looper.loop+128)
#30 pc 00266216 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2093054539+598)
#31 pc 0026c79c /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::CodeItemDataAccessor const&, art::ShadowFrame, art::JValue)+220)
#32 pc 00293e2b /system/lib/libart.so (bool art::interpreter::DoCall(art::ArtMethod
, art::Thread, art::ShadowFrame&, art::Instruction const, unsigned short, art::JValue)+1019)
#33 pc 005bdc5f /system/lib/libart.so (MterpInvokeStatic+207)
#34 pc 005e2ea1 /system/lib/libart.so (ExecuteMterpImpl+14625)
#35 pc 00384ca2 /system/framework/boot-framework.vdex (android.app.ActivityThread.main+214)
#36 pc 00266216 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2093054539+598)
#37 pc 0026c68e /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread
, art::CodeItemDataAccessor const&, art::ShadowFrame)+126)
#38 pc 005a953d /system/lib/libart.so (artQuickToInterpreterBridge+1277)
#39 pc 005f6c6d /system/lib/libart.so (art_quick_to_interpreter_bridge+77)
#40 pc 005f0d52 /system/lib/libart.so (art_quick_invoke_static_stub+418)
#41 pc 000a30df /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread
, unsigned int, unsigned int, art::JValue, char const)+239)
#42 pc 004d3349 /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod
, art::(anonymous namespace)::ArgArray, art::JValue, char const)+89)
#43 pc 004d502e /system/lib/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject
, _jobject, _jobject, unsigned int)+1422)
#44 pc 00449783 /system/lib/libart.so (art::Method_invoke(_JNIEnv, _jobject, _jobject, _jobjectArray)+83)
#45 pc 0011d778 /system/framework/x86/boot.oat (offset 0x114000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+168)
#46 pc 005f0b82 /system/lib/libart.so (art_quick_invoke_stub+338)
#47 pc 000a30ce /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread, unsigned int, unsigned int, art::JValue, char const)+222)
#48 pc 0029bca2 /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread, art::ArtMethod, art::ShadowFrame, unsigned short, art::JValue)+338)
#49 pc 00293e48 /system/lib/libart.so (bool art::interpreter::DoCall(art::ArtMethod, art::Thread, art::ShadowFrame&, art::Instruction const, unsigned short, art::JValue)+1048)
#50 pc 005bc493 /system/lib/libart.so (MterpInvokeVirtual+691)
#51 pc 005e2d21 /system/lib/libart.so (ExecuteMterpImpl+14241)
#52 pc 00c0b7d2 /system/framework/boot-framework.vdex (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
#53 pc 00266216 /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2093054539+598)
#54 pc 0026c68e /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread, art::CodeItemDataAccessor const&, art::ShadowFrame)+126)
#55 pc 005a953d /system/lib/libart.so (artQuickToInterpreterBridge+1277)
#56 pc 005f6c6d /system/lib/libart.so (art_quick_to_interpreter_bridge+77)
#57 pc 00badc3c /system/framework/x86/boot-framework.oat (offset 0x3ca000) (com.android.internal.os.ZygoteInit.main+3100)
#58 pc 005f0d52 /system/lib/libart.so (art_quick_invoke_static_stub+418)
#59 pc 000a30df /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread, unsigned int, unsigned int, art::JValue, char const)+239)
#60 pc 004d3349 /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod, art::(anonymous namespace)::ArgArray, art::JValue, char const)+89)
#61 pc 004d2fcd /system/lib/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject, _jmethodID, char)+429)
#62 pc 003a784d /system/lib/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv
, _jclass, _jmethodID, char)+925)
#63 pc 000d9273 /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodV(char const
, _JNIEnv, _jobject, _jclass, _jmethodID, char, art::Primitive::Type, art::InvokeType)+2867)
#64 pc 000c6d29 /system/lib/libart.so (art::(anonymous namespace)::CheckJNI::CallStaticVoidMethodV(_JNIEnv
, _jclass, _jmethodID, char)+73)
#65 pc 0007097e /system/lib/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass
, _jmethodID, ...)+62)
#66 pc 00073e78 /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const
, android::Vector const&, bool)+744)
#67 pc 00001bb2 /system/bin/app_process32 (main+1506)
#68 pc 000c0f54 /system/lib/libc.so (__libc_init+100)
Failed to send request: {"jsonrpc":"2.0","id":"26","method":"getVM","params":{}}
`

Most helpful comment

It worked after I added

android.useAndroidX=true
android.enableJetifier=true

to the gradle.properties
and

compileSdkVersion 28

to build.gradle

All 3 comments

Same thing here. Maybe it's because of the new Flutter version 1.7.8+hotfix.3. Let's hope we find a fix.

It worked after I added

android.useAndroidX=true
android.enableJetifier=true

to the gradle.properties
and

compileSdkVersion 28

to build.gradle

It worked after I added

android.useAndroidX=true
android.enableJetifier=true

to the gradle.properties
and

compileSdkVersion 28

to build.gradle

Thank man it's help me!!!

Was this page helpful?
0 / 5 - 0 ratings