You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter Android端Instabug反馈/崩溃无法提交至仪表盘问题

Android端Instabug无法上报数据问题排查与解决

问题现象

  • Android设备上提交的bug、应用崩溃数据无法同步到Instabug仪表盘,iOS端功能完全正常
  • 调用show方法提交反馈后,App弹出提示"We've received your feedback!",但后台始终无法查看到对应数据

Instabug集成代码

await Instabug.init(
      token: currentConfig.instabug.apiToken,
      invocationEvents: [
        InvocationEvent.shake,
        InvocationEvent.screenshot,
      ],
    );
    await Instabug.setWelcomeMessageMode(
      WelcomeMessageMode.disabled,
    );

版本信息

instabug_flutter: ^13.3.0
Flutter (Channel stable, 3.19.1)
compileSdkVersion 34
minSdkVersion 28
Xcode - develop for iOS and macOS (Xcode 15.0)

设备范围

所有Android设备

调用show方法后的日志

W/System  (14952): Ignoring header X-Firebase-Locale because its value was null.
W/LocalRequestInterceptor(14952): Error getting App Check token; using placeholder token instead. Error: com.google.firebase.FirebaseException: No AppCheckProvider installed.
D/FirebaseAuth(14952): Notifying id token listeners about user ( 5Nc5RmftLCQasBfpFtcjCCvrAg03 ).
[log]       'event tracked - EventName.ProfileScreen - true',
        name: 'TrackingRepositoryImpl',
        
W/ActivityThread(14952): handleWindowVisibility: no activity for token android.os.BinderProxy@ee2b03e
E/ResourcesCompat(14952): Failed to find font-family tag
I/chatty  (14952): uid=10150(com...dev) identical 6 lines
E/ResourcesCompat(14952): Failed to find font-family tag
E/ResourcesCompat(14952): Failed to find font-family tag
I/chatty  (14952): uid=10150(com....dev) identical 2 lines
E/ResourcesCompat(14952): Failed to find font-family tag
E/ResourcesCompat(14952): Failed to find font-family tag
I/chatty  (14952): uid=10150(com....dev) identical 2 lines
E/ResourcesCompat(14952): Failed to find font-family tag
E/ResourcesCompat(14952): Failed to find font-family tag
I/chatty  (14952): uid=10150(com....dev) identical 2 lines
E/ResourcesCompat(14952): Failed to find font-family tag
D/EGL_emulation(14952): eglMakeCurrent: 0x7365a2f6e0: ver 3 0 (tinfo 0x7365a00940)

点击提交bug按钮后的日志

W/RecyclerView(14952): No adapter attached; skipping layout
W/ActivityThread(14952): handleWindowVisibility: no activity for token android.os.BinderProxy@219ae09
E/ResourcesCompat(14952): Failed to find font-family tag
I/chatty  (14952): uid=10150(com....dev) identical 4 lines
E/ResourcesCompat(14952): Failed to find font-family tag
D/EGL_emulation(14952): eglMakeCurrent: 0x7365a2f6e0: ver 3 0 (tinfo 0x7365a00940)
D/EGL_emulation(14952): eglMakeCurrent: 0x7365a2f6e0: ver 3 0 (tinfo 0x7365a00940)
D/EGL_emulation(14952): eglMakeCurrent: 0x7365a2f6e0: ver 3 0 (tinfo 0x7365a00940)
D/EGL_emulation(14952): eglMakeCurrent: 0x7365a2f6e0: ver 3 0 (tinfo 0x7365a00940)
I/lorermobile.de(14952): Background concurrent copying GC freed 32934(2020KB) AllocSpace objects, 39(2068KB) LOS objects, 43% free, 7929KB/13MB, paused 14us total 118.943ms
E/IBG-Core(14952): Error in Single Thread Executor(IBG-network-single-executor-0). cause: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/perf/network/FirebasePerfUrlConnection;
W/ActivityThread(14952): handleWindowVisibility: no activity for token android.os.BinderProxy@e537b91
D/EGL_emulation(14952): eglMakeCurrent: 0x7361366c00: ver 3 0 (tinfo 0x730f935c80)
D/EGL_emulation(14952): eglMakeCurrent: 0x7361366c00: ver 3 0 (tinfo 0x730f935c80)
D/EGL_emulation(14952): eglMakeCurrent: 0x7365a2f6e0: ver 3 0 (tinfo 0x7365a00940)
D/AutofillManager(14952): onActivityFinishing(): calling cancelLocked()

解决方法

从提交日志中的java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/perf/network/FirebasePerfUrlConnection可以定位到问题根源:Instabug依赖的Firebase Performance SDK缺失或冲突。

步骤1:排除不必要的依赖(若未使用Firebase Performance)

在Module级别的android/app/build.gradle中添加配置,排除Instabug对Firebase Performance的依赖:

configurations.all {
    exclude group: 'com.google.firebase', module: 'firebase-perf'
}

步骤2:添加完整依赖(若需要使用Firebase Performance)

确保项目中已添加Firebase Performance的完整依赖:

implementation 'com.google.firebase:firebase-perf:20.4.1'

步骤3:清理缓存并重新构建

执行以下命令清理项目缓存,避免旧依赖干扰:

flutter clean
flutter pub get
cd android && ./gradlew clean && cd ..
flutter run

步骤4:验证初始化配置

确认Instabug初始化时使用的API Token正确,且初始化逻辑在App启动阶段正常执行。

内容的提问来源于stack exchange,提问作者Maryam K

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.19 07:17:04