Flutter发布的应用程序在启动时崩溃:找不到libflutter.so。

huangapple go评论94阅读模式
英文:

Flutter Release app crash on startup: libflutter.so not found

问题

这个问题仍然在Flutter版本1.20.1中发生。发布版本在2或3天前还正常工作。这突然发生了。调试变体没有问题,但发布变体根本无法启动。

以下是来自Android Studio的错误信息:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.moshaveron.app, PID: 26315
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.moshaveron.app/com.example.moshaveron.MainActivity}: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/lib/x86, /data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/base.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libflutter.so"
        ...

以下是所有我的插件列表:

cupertino_icons: ^0.1.3
provider: ^4.1.3
shared_preferences: ^0.5.6
animations: ^1.1.1
flutter_svg: ^0.17.4
page_indicator: ^0.3.0
pin_code_fields: ^3.1.2
shimmer: ^1.1.1
carousel_slider: ^2.2.1
like_button: ^1.0.1
flutter_picker: ^1.1.5
image_picker: ^0.6.7+4
image_cropper: ^1.2.3
path_provider: ^1.6.11
file_picker: ^1.12.0
dio: ^3.0.9
connectivity: ^0.4.9
transparent_image: ^1.0.0
rxdart: ^0.24.1
string_validator: ^0.1.4
package_info: ^0.4.1
url_launcher: ^5.5.0
cached_network_image: ^2.2.0+1
sliding_up_panel: ^1.0.2
intl: ^0.16.1
simple_animations: ^2.2.1
video_player: ^0.10.11+2
flutter_colorpicker: ^0.3.4
font_awesome_flutter: ^8.8.1
random_color: ^1.0.5
http: ^0.12.2
socket_io_client: ^0.9.11
flutter_webrtc: ^0.2.8
fluttertoast: ^7.0.2
英文:

This is still happening in flutter v1.20.1. The release version was working fine just 2 or 3 days ago. This just happened out of nowhere. There no problem on debug variant but release variant doesn't even start at all.

[√] Flutter (Channel stable, 1.20.1, on Microsoft Windows [Version 10.0.18362.959], locale en-US)
• Flutter version 1.20.1 at C:\flutter
• Framework revision 2ae3451 (5 days ago), 2020-08-05 19:53:19 -0700
• Engine revision c8e3b94853
• Dart version 2.9.0

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\Users\Sepehr\AppData\Local\Android\Sdk
• Platform android-29, build-tools 28.0.3
• ANDROID_HOME = C:\Users\Sepehr\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.

[!] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[!] IntelliJ IDEA Community Edition (version 2019.2)
• IntelliJ at E:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.2.4
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins

[√] VS Code (version 1.47.3)
• VS Code at C:\Users\Sepehr\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.13.2

[√] VS Code, 64-bit edition (version 1.33.0)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.13.2

[√] Connected device (1 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)

Here's the error from android studio:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.moshaveron.app, PID: 26315
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.moshaveron.app/com.example.moshaveron.MainActivity}: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/lib/x86, /data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/base.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libflutter.so"
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
        at android.app.ActivityThread.-wrap11(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6541)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
     Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/lib/x86, /data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/base.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libflutter.so"
        at io.flutter.embedding.engine.loader.FlutterLoader.ensureInitializationComplete(Unknown Source:246)
        at io.flutter.embedding.engine.FlutterEngine.<init>(Unknown Source:150)
        at io.flutter.embedding.engine.FlutterEngine.<init>(Unknown Source:19)
        at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.setupFlutterEngine(Unknown Source:110)
        at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(Unknown Source:7)
        at io.flutter.embedding.android.FlutterActivity.onCreate(Unknown Source:22)
        at android.app.Activity.performCreate(Activity.java:6975)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892) 
        at android.app.ActivityThread.-wrap11(Unknown Source:0) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593) 
        at android.os.Handler.dispatchMessage(Handler.java:105) 
        at android.os.Looper.loop(Looper.java:164) 
        at android.app.ActivityThread.main(ActivityThread.java:6541) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 
     Caused by: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/lib/x86, /data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/base.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libflutter.so"
        at java.util.concurrent.FutureTask.report(FutureTask.java:123)
        at java.util.concurrent.FutureTask.get(FutureTask.java:193)
        at io.flutter.embedding.engine.loader.FlutterLoader.ensureInitializationComplete(Unknown Source:23)
        at io.flutter.embedding.engine.FlutterEngine.<init>(Unknown Source:150) 
        at io.flutter.embedding.engine.FlutterEngine.<init>(Unknown Source:19) 
        at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.setupFlutterEngine(Unknown Source:110) 
        at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(Unknown Source:7) 
        at io.flutter.embedding.android.FlutterActivity.onCreate(Unknown Source:22) 
        at android.app.Activity.performCreate(Activity.java:6975) 
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213) 
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770) 
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892) 
        at android.app.ActivityThread.-wrap11(Unknown Source:0) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593) 
        at android.os.Handler.dispatchMessage(Handler.java:105) 
        at android.os.Looper.loop(Looper.java:164) 
        at android.app.ActivityThread.main(ActivityThread.java:6541) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 
     Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/lib/x86, /data/app/com.moshaveron.app-5pAD9es955nc0lR2SqLCkQ==/base.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libflutter.so"
        at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
        at java.lang.System.loadLibrary(System.java:1657)
        at io.flutter.embedding.engine.loader.FlutterLoader$1.call(Unknown Source:10)
        at io.flutter.embedding.engine.loader.FlutterLoader$1.call(Unknown Source:0)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
2020-08-10 23:45:50.092 26315-26315/? E/AndroidRuntime:     at java.lang.Thread.run(Thread.java:764)
2020-08-10 23:45:50.101 1679-7140/? W/ActivityManager:   Force finishing activity com.moshaveron.app/com.example.moshaveron.MainActivity

And here's a list of all my plugins:

cupertino_icons: ^0.1.3
provider: ^4.1.3
shared_preferences: ^0.5.6
animations: ^1.1.1
flutter_svg: ^0.17.4
page_indicator: ^0.3.0
pin_code_fields: ^3.1.2
shimmer: ^1.1.1
carousel_slider: ^2.2.1
like_button: ^1.0.1
flutter_picker: ^1.1.5
image_picker: ^0.6.7+4
image_cropper: ^1.2.3
path_provider: ^1.6.11
file_picker: ^1.12.0
dio: ^3.0.9
connectivity: ^0.4.9
transparent_image: ^1.0.0
rxdart: ^0.24.1
string_validator: ^0.1.4
package_info: ^0.4.1
url_launcher: ^5.5.0
cached_network_image: ^2.2.0+1
sliding_up_panel: ^1.0.2
intl: ^0.16.1
simple_animations: ^2.2.1
video_player: ^0.10.11+2
flutter_colorpicker: ^0.3.4
font_awesome_flutter: ^8.8.1
random_color: ^1.0.5
http: ^0.12.2
socket_io_client: ^0.9.11
flutter_webrtc: ^0.2.8
fluttertoast: ^7.0.2

答案1

得分: -2

问题出在flutter_webrtc上。
我将它移除后,一切恢复正常。

英文:

The problem was flutter_webrtc.
I removed it and everything went back to normal.

huangapple
  • 本文由 发表于 2020年8月11日 03:21:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/63346688.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定