我通常使用codemagic.com的构建服务来构建移动应用程序。在本周内,我没有更改代码的任何内容,除了内部版本号。
今天,新的AppBundle编译之后,我的手机崩溃了,错误堆栈来自firebase console
。
致命异常:java.lang.NoSuchMethodError 没有静态方法createAsync(Landroid / os / Looper;)Landroid / os / Handler;在类Landroidx / core / os / HandlerCompat中;或其超级类(“ androidx.core.os.HandlerCompat”的声明出现在/data/app/zipedia.zipediaapps-BpzH5e6LIznAEB3YpE_SGw==/base.apk中)
此崩溃发生在本周(上周还可以),这意味着第三方插件库中有更新或颤动,但我不知道哪个插件导致了此崩溃,因为我并没有改变我的代码。
以下是我的pubspec.yaml
规范:
rxdart_codemod: ^0.1.5
angles: ^1.0.1
app_settings: ^1.0.5
archive: ^2.0.8
flutter_cache_manager: ^1.4.0
cached_network_image: ^2.2.0+1
carousel_slider: ^1.3.0
cron: ^0.2.1
crypto: ^2.0.6
cupertino_icons: ^0.1.2
date_format: ^1.0.5
device_id: ^0.1.3
dio: ^3.0.9
easy_alert: ^0.0.2
localstorage: ^2.0.0
audioplayers: ^0.13.1
path_provider: ^1.1.0
esys_flutter_share: ^1.0.2
flutter_compass: ^0.3.2
flutter_html: ^0.9.6
flutter_local_notifications: ^0.8.2
flutter_offline: ^0.2.4+1
flutter_swiper: ^1.1.6
flutter_xlider: ^2.4.5
font_awesome_flutter: ^8.2.0
geolocator: ^5.0.1
google_maps_flutter: ^0.2.0
google_sign_in: ^4.0.1+1
http: ^0.12.1
libcalendar: ^0.2.0
observable: ^0.22.2
location : ^2.3.0
numberpicker: ^1.0.0
pigment: ^1.0.3
# rxdart: ^0.24.1
rxdart: ">=0.18.1 <0.24.1"
shared_preferences: ^0.5.1+1
shimmer: ^1.0.0
unicode: ^0.1.0
url_launcher: ^5.0.2
validate: ^1.6.0
vibrate: ^0.0.4
# quran purpose
after_layout: ^1.0.7+2
draggable_scrollbar: ^0.0.4
flutter_web_browser: ^0.11.0
flutter_youtube: ^1.1.6
google_api_availability: ^2.0.1
indexed_list_view: ^0.0.5
permission_handler: ^3.1.0
queries: ^0.1.4
rect_getter: ^0.0.1
scroll_to_index: any
sqflite: ^1.1.5
tuple: ^1.0.2
xml2json: ^3.0.3
firebase_messaging: ^5.1.6
firebase_analytics: ^3.0.2
firebase_core: ^0.4.0+3
firebase_auth: ^0.11.1+6
firebase_admob: ^0.9.0+1
firebase_in_app_messaging: ^0.0.1+3
#button_style
superellipse_shape: ^0.1.5
#device info
device_info: ^0.4.0+2
#in-app-purchase
in_app_purchase: ^0.2.0+6
#realtime-error-reporting
sentry: any
#system_info
system_info: ^0.1.1
#highlight for tutorial
highlighter_coachmark: ^0.0.3
#detect sound
volume: ^0.1.0
#admob
admob_flutter: ^0.3.2
#other
bubble_tab_indicator: "^0.1.4"
material_design_icons_flutter: ^3.0.3289
scoped_model: ^1.0.1
flutter_slidable: ^0.4.9
kiwi: ^0.1.0
flutter_markdown: ^0.2.0
#download & save file to storage
flutter_downloader: ^1.2.1
native_ads: ^0.2.0
onesignal_flutter: ^2.0.0
##TEMPORARY DISABLED
#flutter_facebook_login: ^3.0.0
USB调试日志:
08-17 11:18:42.282 12595 12600 I zygote64:将代码缓存容量增加到128KB 08-17 11:18:42.283 12595 12595 I CrashlyticsInitProvider:CrashlyticsInitProvider初始化成功 08-17 11:18:42.285 12595 12595 D AndroidRuntime:关闭VM
---------崩溃开始 08-17 11:18:42.285 12595 12595 E AndroidRuntime:致命异常:主要 08-17 11:18:42.285 12595 12595 E AndroidRuntime:进程:zipedia.zipediaapps,PID:12595 08-17 11:18:42.285 12595 12595 E AndroidRuntime: java.lang.NoSuchMethodError:没有静态方法createAsync(Landroid / os / Looper;)Landroid / os / Handler;在类Landroidx / core / os / HandlerCompat中;或其超级类(“ androidx.core.os.HandlerCompat”的声明出现在/data/app/zipedia.zipediaapps-XKGzJQs6twT4qKb4AGKGTQ==/base.apk中)
08-17 11:18:42.285 12595 12595 E AndroidRuntime:在androidx.work.impl.DefaultRunnableScheduler。**(DefaultRunnableScheduler.java:40) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:at androidx.work.Configuration。(Configuration.java:106) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:at androidx.work.Configuration $ Builder.build(Configuration.java:434) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:在androidx.work.impl.WorkManagerInitializer.onCreate(WorkManagerInitializer.java:40) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:at android.content.ContentProvider.attachInfo(ContentProvider.java:1919) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:at android.content.ContentProvider.attachInfo(ContentProvider.java:1894) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:在android.app.ActivityThread.installProvider(ActivityThread.java:6316) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:在android.app.ActivityThread.installContentProviders(ActivityThread.java:5882) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:在android.app.ActivityThread.handleBindApplication(ActivityThread.java:5803) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:位于android.app.ActivityThread.-wrap1(未知来源:0) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1666) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:at android.os.Handler.dispatchMessage(Handler.java:105) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:at android.os.Looper.loop(Looper.java:251) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:at android.app.ActivityThread.main(ActivityThread.java:6572) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:在java.lang.reflect.Method.invoke(本机方法)
08-17 11:18:42.285 12595 12595 E AndroidRuntime:在com.android.internal.os.Zygote $ MethodAndArgsCaller.run(Zygote.java:240) 08-17 11:18:42.285 12595 12595 E AndroidRuntime:在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 08-17 11:18:43.407 703779 E ANDR-PERF-OPTSHANDLER:perf_lock_rel:更新了/ sys / class / mmc_host / mmc0 / clk_scaling /启用为0 08-17 11:18:43.407 703779 E ANDR-PERF-OPTSHANDLER:返回值2 08-17 11:18:44.199 2831 4931 I ActivityManager:杀死10866:com.sonymobile.smartcharger / 1000(adj 906):空#17 08-17 11:18:44.210 2831 4931 I ActivityManager:杀死11915:com.discord / u0a315(adj 906):空#18 08-17 11:18:44.698 677 677 D audio_hw_primary:out_standby:输入:流(0xf13d4000)用例(1:低延迟播放) 08-17 11:18:44.802 677 677 D audio_hw_primary:disable_audio_route:重置并更新混音器路径:低延迟播放 08-17 11:18:44.807 677 677 D hardware_info:hw_info_append_hw_type:device_name =扬声器 08-17 11:18:44.808 677 677 D audio_hw_primary:disable_snd_device:snd_device(84:扬声器) 08-17 11:18:44.829 677 677 D hardware_info:hw_info_append_hw_type:device_name = vi-feedback
08-17 11:18:44.830 677 677 D audio_hw_primary:disable_snd_device:snd_device(242:vi-反馈) 08-17 11:18:44.830 677 677 D msm8974_platform:platform_split_snd_device:snd_device(242)num devices(0)new_snd_devices(-238434933) 08-17 11:18:44.830 677 677 D audio_hw_primary:disable_audio_route:重置和更新混音器路径:spkr-vi-record 08-17 11:18:44.867 677 677 D audio_hw_extn:audio_extn_get_anc_enabled:anc_enabled:0 08-17 11:18:44.867 677 677 D audio_hw_extn:audio_extn_get_anc_enabled:anc_enabled:0 08-17 11:18:44.867 677 677 D audio_hw_primary:out_standby:退出 08-17 11:18:46.288 12595 12595 E CrashlyticsCore:无法执行任务。 08-17 11:18:46.288 12595 12595 E CrashlyticsCore:java.util.concurrent.TimeoutException 08-17 11:18:46.288 12595 12595 E CrashlyticsCore:位于java.util.concurrent.FutureTask.get(FutureTask.java:206) 08-17 11:18:46.288 12595 12595 E CrashlyticsCore:位于com.crashlytics.android.core.CrashlyticsBackgroundWorker.submitAndWait(CrashlyticsBackgroundWorker.java:41) 08-17 11:18:46.288 12595 12595 E CrashlyticsCore:位于com.crashlytics.android.core.CrashlyticsController.handleUncaughtException(CrashlyticsController.java:321) 08-17 11:18:46.288 12595 12595 E CrashlyticsCore:at com.crashlytics.android.core.CrashlyticsController $ 6.onUncaughtException(CrashlyticsController.java:301) 08-17 11:18:46.288 12595 12595 E CrashlyticsCore:位于com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.uncaughtException(CrashlyticsUncaughtExceptionHandler.java:42) 08-17 11:18:46.288 12595 12595 E CrashlyticsCore:位于java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068) 08-17 11:18:46.288 12595 12595 E CrashlyticsCore:位于java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1063) 08-17 11:18:46.288 12595 12595 E CrashlyticsCore:位于java.lang.Thread.dispatchUncaughtException(Thread.java:1953) 08-17 11:18:46.301 2831 3677 D ActivityManager:新的保管箱条目:zipedia.zipediaapps,data_app_crash,3558ffd2-7966-4d8d-8ba6-2ceca752fb06 08-17 11:18:46.310 2831 3677 W ActivityManager:强制完成活动zipedia.zipediaapps / .MainActivity 08-17 11:18:46.313 2831 3677 D ActivityTrigger:ActivityTrigger activityPauseTrigger
08-17 11:18:46.323 2831 3677 W ActivityManager:强制完成活动com.android.vending / .AssetBrowserActivity 08-17 11:18:46.335 2831 3677 I ActivityManager:Killing 12013:com.sonymobile.coverapp2 / 1000(adj 906):空#17 08-17 11:18:46.338 12111 12111 I Finsky:[2] rjc.onTrimMemory(1):请求内存调整到20级 08-17 11:18:46.339 12111 12111 I Finsky:[2] rjc.onTrimMemory(2):刷新内存中图像缓存 08-17 11:18:46.352 2831 2891 W BroadcastQueue:不允许后台执行:接收com.google.android.gms / .stats的Intent {act = android.intent.action.DROPBOX_ENTRY_ADDED flg = 0x10(有其他功能)}。 service.DropBoxEntryAddedReceiver 08-17 11:18:46.352 2831 2891 W BroadcastQueue:不允许后台执行:接收com.google.android.gms / .chimera的Intent {act = android.intent.action.DROPBOX_ENTRY_ADDED flg = 0x10(有其他功能)}。 GmsIntentOperationService $ PersistentTrustedReceiver 08-17 11:18:46.353 2831 2891 W BroadcastQueue:不允许后台执行:接收到com.sonyericsson.crashmonitor / .receiver.CrashMonitorServiceBroadcastReceiver的Intent { 08-17 11:18:46.356 2496 2496 I JavaDumper:main:dest_path:/data/system/log/jd_dropboxfiles/data_app_crash@1597637926341.txt 08-17 11:18:46.356 2496 2496 I JavaDumper:main:tot_read:1699,tot_write:1699 08-17 11:18:46.356 2496 2496 I JavaDumper:main:已成功将保管箱文件复制到/data/system/log/jd_dropboxfiles/data_app_crash@1597637926341.txt 08-17 11:18:46.357 2496 2496 D clmlib:得到的活动:0x00000008 08-17 11:18:46.359 12111 12111 W ProxyAndroidLoggerBackend:配置前收到太多Flogger日志。删除旧日志。 08-17 11:18:46.362 12111 12248 W ProxyAndroidLoggerBackend:配置前收到太多Flogger日志。删除旧日志。 08-17 11:18:46.363 2496 2496 I JavaDumper:JavaDumperThread:addEvent:data_app_crash@1597637926341.txt进程名称:zipedia.zipediaapps 08-17 11:18:46.363 2496 2540 I JavaDumper:JavaDumperThread:事件:data_app_crash@1597637926341.txt时间戳:1597637926 08-17 11:18:46.419 2496 2540 W JavaDumper:JavaDumper:无法初始化转储目录:未知错误-95 08-17 11:18:46.420 2496 2540 E JavaDumper:FW:utils.c(257):mkdir(/ data / crashdata)失败。文件已存在 08-17 11:18:46.423 2831 2893 I ActivityManager:显示软件包zipedia.zipediaapps u0的崩溃对话框
有什么主意吗?
答案 0 :(得分:0)
您可以尝试更新Firebase软件包的依赖项吗?
答案 1 :(得分:0)
启动时Flutter应用程序崩溃主要是由于任何Package依赖关系问题引起的
可以通过在项目文件夹中的以下命令将错误原因调试到终端中
adb logcat
在您的情况下08-17 11:18:42.282 12595 12600 I zygote64: Increasing code cache capacity to 128KB 08-17 11:18:42.283 12595 12595 I CrashlyticsInitProvider: CrashlyticsInitProvider initialization successful 08-17 11:18:42.285 12595 12595 D AndroidRuntime: Shutting down VM
似乎是crashlytics错误
检查您是否已在android / app / build.gradle中应用了必需的依赖项 如图所示
apply plugin: 'io.fabric'
adb logcat
可以提供引起问题的确切错误的详细信息
答案 2 :(得分:0)
project build.gradle
是否指定了androidx.core版本
类似于以下内容
rootProject.allprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'androidx.core') {
details.useVersion "1.0.1"
}
}
}
}
如果是这样,请将其删除
答案 3 :(得分:0)
这周我在codemagic上遇到了类似的问题,但是当我在本地构建并推送到Google Play控制台/ App Store Connect时,该应用程序成功运行。也许是来自Codemagic的问题?