我的应用程序一启动就崩溃(仅在发布模式下)。 这似乎是一个段错误(感谢 logcat,请参阅附加日志),但我没有接触过任何本机代码,所以我不确定它来自哪里,以及如何调试它......
这是我的
flutter doctor -v
:
flutter doctor -v
[√] Flutter (Channel stable, 3.13.7, on Microsoft Windows [version 10.0.19045.3570], locale fr-FR) • Flutter version 3.13.7 on channel stable at C:\Users\Me\Documents\Code\SDK\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 2f708eb (9 days ago), 2023-10-09 09:58:08 -0500 • Engine revision a794cf2681 • Dart version 3.1.3 • DevTools version 2.25.0
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at C:\Users\Me\AppData\Local\Android\sdk
• Platform android-33, build-tools 31.0.0
• Java binary at: C:\Program Files\Android\Android Studio1\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.7.4)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.7.34031.279
X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components:
MSVC v142 - VS 2019 C++ x64/x86 build tools
- If there are multiple build tool versions available, install the latest
C++ CMake tools for Windows
Windows 10 SDK
[√] Android Studio (version 2021.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
[√] Android Studio (version 2022.2)
• Android Studio at C:\Program Files\Android\Android Studio1
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
[√] IntelliJ IDEA Community Edition (version 2022.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.3.2
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
[√] VS Code (version 1.83.1)
• VS Code at C:\Users\Me\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.74.0
[√] Connected device (5 available)
• M2012K11AG (mobile) • 192.168.178.28:39079 • android-arm64 • Android 13 (API 33)
• POCOPHONE F1 (mobile) • 192.168.178.29:5555 • android-arm64 • Android 10 (API 29)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [version 10.0.19045.3570]
• Chrome (web) • chrome • web-javascript • Google Chrome 117.0.5938.152
• Edge (web) • edge • web-javascript • Microsoft Edge 115.0.1901.203
[√] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
这是 logcat 输出:
10-18 14:51:50.663 2485 2485 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-18 14:51:50.663 2485 2485 F DEBUG : Build fingerprint: 'Xiaomi/beryllium/beryllium:10/QKQ1.190828.002/V11.0.9.0.QEJMIXM:user/release-keys'
10-18 14:51:50.663 2485 2485 F DEBUG : Revision: '0'
10-18 14:51:50.663 2485 2485 F DEBUG : ABI: 'arm64'
10-18 14:51:50.664 2485 2485 F DEBUG : Timestamp: 2023-10-18 14:51:50+0200
10-18 14:51:50.664 2485 2485 F DEBUG : pid: 2454, tid: 2454, name: fr.circleshare >>> fr.circleshare <<<
10-18 14:51:50.664 2485 2485 F DEBUG : uid: 10757
10-18 14:51:50.664 2485 2485 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x86
10-18 14:51:50.664 2485 2485 F DEBUG : Cause: null pointer dereference
10-18 14:51:50.664 2485 2485 F DEBUG : x0 0000000000000000 x1 000000000000007e x2 0000000000000000 x3 0000007fd8b418a8
10-18 14:51:50.664 2485 2485 F DEBUG : x4 0000007fd8b418ac x5 0000007e63068a39 x6 0000800000000000 x7 2e33774b04ff3a60
10-18 14:51:50.664 2485 2485 F DEBUG : x8 00000000a298c000 x9 19bf5d8f6296c9d7 x10 0000007fd8b418a4 x11 0000007e63f7d1dc
10-18 14:51:50.664 2485 2485 F DEBUG : x12 0000007e63f7d224 x13 0000007e63f7d26c x14 0000007e63f7d2cc x15 0000000000000000
10-18 14:51:50.664 2485 2485 F DEBUG : x16 0000007fd8b418a8 x17 0000000000000000 x18 0000007eeaf1c000 x19 0000007e65069c00
10-18 14:51:50.664 2485 2485 F DEBUG : x20 0000000000000000 x21 0000007fd8b418a8 x22 000000000000007e x23 00000000d8b42080
10-18 14:51:50.664 2485 2485 F DEBUG : x24 0000007e64413000 x25 0000007ee9d5f020 x26 0000000000000043 x27 0000007ee9d5f020
10-18 14:51:50.664 2485 2485 F DEBUG : x28 0000000000000043 x29 0000007fd8b41830
10-18 14:51:50.664 2485 2485 F DEBUG : sp 0000007fd8b417b0 lr 0000007e64209c98 pc 0000007e64209c9c
10-18 14:51:50.686 2357 2357 D EventBus: [2357, u0] send(AppTransitionFinishedEvent)
10-18 14:51:50.687 2357 2357 D EventBus: [2357, u0] -> ForcedResizableInfoActivityController [0x445d9f1, P1] onBusEvent(AppTransitionFinishedEvent)
10-18 14:51:50.687 2357 2357 D EventBus: [2357, u0] onBusEvent(AppTransitionFinishedEvent) duration: 14 microseconds, avg: 179
10-18 14:51:50.687 2357 2357 D EventBus: [2357, u0] send(AppTransitionFinishedEvent)
10-18 14:51:50.687 2357 2357 D EventBus: [2357, u0] -> ForcedResizableInfoActivityController [0x445d9f1, P1] onBusEvent(AppTransitionFinishedEvent)
10-18 14:51:50.687 2357 2357 D EventBus: [2357, u0] onBusEvent(AppTransitionFinishedEvent) duration: 5 microseconds, avg: 178
10-18 14:51:50.688 2107 2135 I Timeline: Timeline: App_transition_stopped time:15346760
10-18 14:51:51.077 2485 2485 F DEBUG :
10-18 14:51:51.077 2485 2485 F DEBUG : backtrace:
10-18 14:51:51.077 2485 2485 F DEBUG : #00 pc 00000000003c2c9c /apex/com.android.runtime/lib64/libart.so (art::JNI::GetStringChars(_JNIEnv*, _jstring*, unsigned char*)+620) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #01 pc 0000000000156b84 /system/lib64/libandroid_runtime.so (android::android_content_XmlBlock_nativeGetAttributeIndex(_JNIEnv*, _jobject*, long, _jstring*, _jstring*)+72) (BuildId: 1d7baea5f024f2014e5eeed6dece8fa6)
10-18 14:51:51.077 2485 2485 F DEBUG : #02 pc 0000000000a3aef0 /system/framework/arm64/boot-framework.oat (art_jni_trampoline+208) (BuildId: 875c0b6fad51c97f190b23a8bb6697e1afa7c768)
10-18 14:51:51.077 2485 2485 F DEBUG : #03 pc 0000000001229bcc /system/framework/arm64/boot-framework.oat (android.content.res.XmlBlock$Parser.getAttributeValue+60) (BuildId: 875c0b6fad51c97f190b23a8bb6697e1afa7c768)
10-18 14:51:51.077 2485 2485 F DEBUG : #04 pc 0000000000136334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #05 pc 0000000000144fec /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #06 pc 00000000002e27cc /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #07 pc 00000000002dda2c /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #08 pc 00000000005a1540 /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+980) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #09 pc 0000000000130a14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #10 pc 00000000000cc93e /data/app/fr.circleshare-k-paSNkK8J6kbbwrqx1Big==/oat/arm64/base.vdex (androidx.core.content.g.h+38)
10-18 14:51:51.077 2485 2485 F DEBUG : #11 pc 00000000005a2af8 /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+1040) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #12 pc 0000000000130994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #13 pc 00000000000cc8a6 /data/app/fr.circleshare-k-paSNkK8J6kbbwrqx1Big==/oat/arm64/base.vdex (androidx.core.content.g.e+22)
10-18 14:51:51.077 2485 2485 F DEBUG : #14 pc 00000000005a2af8 /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+1040) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #15 pc 0000000000130994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #16 pc 00000000000ccd0e /data/app/fr.circleshare-k-paSNkK8J6kbbwrqx1Big==/oat/arm64/base.vdex (androidx.core.content.g.attachInfo+62)
10-18 14:51:51.077 2485 2485 F DEBUG : #17 pc 00000000002b3ae0 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.17460956533834400288+240) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #18 pc 00000000005912f0 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #19 pc 000000000013f468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #20 pc 0000000000cb7168 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.installProvider+1752) (BuildId: 875c0b6fad51c97f190b23a8bb6697e1afa7c768)
10-18 14:51:51.077 2485 2485 F DEBUG : #21 pc 0000000000cb6918 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.installContentProviders+280) (BuildId: 875c0b6fad51c97f190b23a8bb6697e1afa7c768)
10-18 14:51:51.077 2485 2485 F DEBUG : #22 pc 0000000000cafa38 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.handleBindApplication+7192) (BuildId: 875c0b6fad51c97f190b23a8bb6697e1afa7c768)
10-18 14:51:51.077 2485 2485 F DEBUG : #23 pc 0000000000ca412c /system/framework/arm64/boot-framework.oat (android.app.ActivityThread$H.handleMessage+7420) (BuildId: 875c0b6fad51c97f190b23a8bb6697e1afa7c768)
10-18 14:51:51.077 2485 2485 F DEBUG : #24 pc 000000000166f9a4 /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+180) (BuildId: 875c0b6fad51c97f190b23a8bb6697e1afa7c768)
10-18 14:51:51.077 2485 2485 F DEBUG : #25 pc 0000000001678e04 /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+1540) (BuildId: 875c0b6fad51c97f190b23a8bb6697e1afa7c768)
10-18 14:51:51.077 2485 2485 F DEBUG : #26 pc 0000000000cb87a4 /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.main+756) (BuildId: 875c0b6fad51c97f190b23a8bb6697e1afa7c768)
10-18 14:51:51.077 2485 2485 F DEBUG : #27 pc 00000000001365b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #28 pc 000000000014500c /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #29 pc 00000000004afcf4 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #30 pc 00000000004b1898 /apex/com.android.runtime/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1480) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #31 pc 000000000043cc3c /apex/com.android.runtime/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #32 pc 00000000006d4b34 /system/framework/arm64/boot.oat (art_jni_trampoline+180) (BuildId: 178682794d896aa0861e6b421cbfbee013eb0917)
10-18 14:51:51.077 2485 2485 F DEBUG : #33 pc 00000000022e32d8 /system/framework/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136) (BuildId: 875c0b6fad51c97f190b23a8bb6697e1afa7c768)
10-18 14:51:51.077 2485 2485 F DEBUG : #34 pc 0000000002303a54 /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2100) (BuildId: 875c0b6fad51c97f190b23a8bb6697e1afa7c768)
10-18 14:51:51.077 2485 2485 F DEBUG : #35 pc 00000000001365b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #36 pc 000000000014500c /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #37 pc 00000000004afcf4 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #38 pc 00000000004af8e4 /apex/com.android.runtime/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+408) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #39 pc 00000000003ba680 /apex/com.android.runtime/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+624) (BuildId: 2bc2e11d57f839316bf2a42bbfdf943a)
10-18 14:51:51.077 2485 2485 F DEBUG : #40 pc 00000000000c09ec /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+116) (BuildId: 1d7baea5f024f2014e5eeed6dece8fa6)
10-18 14:51:51.077 2485 2485 F DEBUG : #41 pc 00000000000c39b0 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+944) (BuildId: 1d7baea5f024f2014e5eeed6dece8fa6)
10-18 14:51:51.078 2485 2485 F DEBUG : #42 pc 00000000000035bc /system/bin/app_process64 (main+1388) (BuildId: 48163b9f3f369f4e0e105e516c26f543)
10-18 14:51:51.078 2485 2485 F DEBUG : #43 pc 000000000006ebc4 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108) (BuildId: f6cc5d2d702265511937b56460b37693)
10-18 14:51:51.238 2485 2485 E crash_dump64: cannot open libmiuindbg.so: No such file or directory
10-18 14:51:51.239 1368 1368 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_02
该应用程序也相当庞大,并且有很多软件包。我全部更新了,做了 clean + get,但问题仍然存在。
有人可以帮我吗?它完全阻止我释放它...... 我尝试过上面列出的 2 种不同的 Android 设备,但结果相同。
这是 android gradle 插件 8+ 的吗? 尝试降级或在 gradle.properties 中设置
android.enableR8.fullMode=false
确保已安装 Java 并设置环境变量。