iampawan / Flutter-Music-Player

Flutter Music Player - First Open Source Flutter based material design music player with audio plugin to play local music files.
Apache License 2.0
1.72k stars 549 forks source link

crash when I copy it into my project #25

Open mohammadne opened 5 years ago

mohammadne commented 5 years ago

/* E/flutter (14098): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(40)] java.lang.NoSuchMethodError: No virtual method requestPermissions([Ljava/lang/String;I)V in class Landroid/app/Activity; or its super classes (declaration of 'android.app.Activity' appears in /system/framework/framework.jar) E/flutter (14098): at com.mtechviral.musicfinder.MusicFinderPlugin.requestPermissions(MusicFinderPlugin.java:147) E/flutter (14098): at com.mtechviral.musicfinder.MusicFinderPlugin.checkPermission(MusicFinderPlugin.java:120) E/flutter (14098): at com.mtechviral.musicfinder.MusicFinderPlugin.onMethodCall(MusicFinderPlugin.java:83) E/flutter (14098): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:201) E/flutter (14098): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:88) E/flutter (14098): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:219) E/flutter (14098): at android.os.MessageQueue.nativePollOnce(Native Method) E/flutter (14098): at android.os.MessageQueue.next(MessageQueue.java:143) E/flutter (14098): at android.os.Looper.loop(Looper.java:122) E/flutter (14098): at android.app.ActivityThread.main(ActivityThread.java:5254) E/flutter (14098): at java.lang.reflect.Method.invoke(Native Method) E/flutter (14098): at java.lang.reflect.Method.invoke(Method.java:372) E/flutter (14098): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) E/flutter (14098): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) E/flutter (14098): F/flutter (14098): [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(77)] Check failed: CheckException(env). F/libc (14098): Fatal signal 6 (SIGABRT), code -6 in tid 14098 (r.gerama.gerama)


Build fingerprint: 'google/nakasi/grouper:5.1.1/LMY47V/1836172:user/release-keys' Revision: '0' ABI: 'arm' pid: 14098, tid: 14098, name: r.gerama.gerama >>> ir.gerama.gerama <<< 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). ' r0 00000000 r1 00003712 r2 00000006 r3 00000000 r4 400efe38 r5 00000006 r6 0000000b r7 0000010c r8 befd8084 r9 befd80d0 sl 00000066 fp 5a91f550 ip 00003712 sp befd7f60 lr 40166c81 pc 4018cc04 cpsr 600f0010 backtrace:

00 pc 0003cc04 /system/lib/libc.so (tgkill+12)

#01 pc 00016c7d  /system/lib/libc.so (pthread_kill+52)
#02 pc 0001789b  /system/lib/libc.so (raise+10)
#03 pc 00014029  /system/lib/libc.so
#04 pc 000124f0  /system/lib/libc.so (abort+4)
#05 pc 0000e5ab  /data/app/ir.gerama.gerama-1/lib/arm/libflutter.so
#06 pc 00005115  /data/app/ir.gerama.gerama-1/lib/arm/libflutter.so
#07 pc 00003e03  /data/app/ir.gerama.gerama-1/lib/arm/libflutter.so
#08 pc 00033c13  /data/app/ir.gerama.gerama-1/lib/arm/libflutter.so
#09 pc 0000ecf3  /data/app/ir.gerama.gerama-1/lib/arm/libflutter.so
#10 pc 000117ff  /data/app/ir.gerama.gerama-1/lib/arm/libflutter.so
#11 pc 00011937  /system/lib/libutils.so (android::SimpleLooperCallback::handleEvent(int, int, void*)+10)
#12 pc 00012597  /system/lib/libutils.so (android::Looper::pollInner(int)+482)
#13 pc 00012641  /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+92)
#14 pc 000817d9  /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, int)+22)
#15 pc 000b387b  /data/dalvik-cache/arm/system@framework@boot.oat

Tombstone written to: /data/tombstones/tombstone_06 Lost connection to device. */ Can anyone help me?

MDolega20 commented 5 years ago

I've got similar error too.

Ahmedhassan50 commented 4 years ago

I've got similar error too.

maks commented 4 years ago

This is likely due to permissions handling on older versions of Android. I have a fix for this in my fork, I'll try to get a PR done soon.

Note the issue is actually in the Flute plugin NOT this app's repo.