配置完成之后在模拟器上能正常运行,但是在真机上运行闪退,我的手机是小米6,不知道怎么回事,以下是错误信息
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.my_flutter_app, PID: 24853
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file “/data/app/com.example.my_flutter_app-3hPtwJQqNENVa1wyeuofTA==/base.apk”],nativeLibraryDirectories=[/data/app/com.example.my_flutter_app-3hPtwJQqNENVa1wyeuofTA==/lib/arm64, /data/app/com.example.my_flutter_app-3hPtwJQqNENVa1wyeuofTA==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]] couldn’t find "libflutter.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
at java.lang.System.loadLibrary(System.java:1657)
at io.flutter.view.FlutterMain.startInitialization(FlutterMain.java:156)
at io.flutter.view.FlutterMain.startInitialization(FlutterMain.java:133)
at io.flutter.app.FlutterApplication.onCreate(FlutterApplication.java:22)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5881)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThreadH.handleMessage(ActivityThread.java:1690)atandroid.os.Handler.dispatchMessage(Handler.java:105)atandroid.os.Looper.loop(Looper.java:176)atandroid.app.ActivityThread.main(ActivityThread.java:6701)atjava.lang.reflect.Method.invoke(NativeMethod)atcom.android.internal.os.ZygoteH.handleMessage(ActivityThread.java:1690)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:6701)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteH.handleMessage(ActivityThread.java:1690)atandroid.os.Handler.dispatchMessage(Handler.java:105)atandroid.os.Looper.loop(Looper.java:176)atandroid.app.ActivityThread.main(ActivityThread.java:6701)atjava.lang.reflect.Method.invoke(NativeMethod)atcom.android.internal.os.ZygoteMethodAndArgsCaller.run(Zygote.java:246)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)
解锁Flutter开发新姿势,,系统掌握Flutter开发核心技术。
了解课程