应用在发布时崩溃,无法从Google Play获取堆栈跟踪

时间:2018-09-24 17:52:38

标签: android google-play flutter

因此,我的应用apk在调试时工作正常,一旦我将其发布以供发布,我的应用即可安装,但在打开该应用后会立即崩溃。我无法使用stacktrace查找错误,因为Google play在我的崩溃标签下仅给了我类似的东西,

pid: 0, tid: 0 >>> myapp.mobile.app <<<

backtrace:
  #00  pc 000000000001cd66  /system/lib/libc.so (abort+58)
  #01  pc 000000000005b861  /data/app/myapp.mobile.app-NMGEC5MygxTSkiehEoUA7A==/lib/arm/libflutter.so
  #02  pc 000000000004ff59  /data/app/myapp.mobile.app-NMGEC5MygxTSkiehEoUA7A==/lib/arm/libflutter.so (JNI_OnLoad+72)
  #03  pc 0000000000234d79  /system/lib/libart.so (art::JavaVMExt::LoadNativeLibrary(_JNIEnv*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, _jobject*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)+2324)
  #04  pc 0000000000002f5b  /system/lib/libopenjdkjvm.so (JVM_NativeLoad+230)
  #05  pc 000000000010c733  /system/framework/arm/boot.oat (java.lang.Runtime.nativeLoad [DEDUPED]+130)
  #06  pc 000000000016708b  /system/framework/arm/boot.oat (java.lang.Runtime.loadLibrary0+146)
  #07  pc 000000000016b94f  /system/framework/arm/boot.oat (java.lang.System.loadLibrary+86)
  #08  pc 000000000040d575  /system/lib/libart.so (art_quick_invoke_stub_internal+68)
  #09  pc 00000000003e6c7b  /system/lib/libart.so (art_quick_invoke_static_stub+222)
  #10  pc 00000000000a1027  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+154)
  #11  pc 00000000001e5ae9  /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+236)
  #12  pc 00000000001e05d7  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+814)
  #13  pc 00000000003e27af  /system/lib/libart.so (MterpInvokeStatic+130)
  #14  pc 0000000000400494  /system/lib/libart.so (ExecuteMterpImpl+14612)
  #15  pc 0000000000008ed4  /data/app/myapp.mobile.app-NMGEC5MygxTSkiehEoUA7A==/oat/arm/base.vdex (io.flutter.view.FlutterMain.a+80)
  #16  pc 00000000001c4d53  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2471763592+378)
  #17  pc 00000000001c9439  /system/lib/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+152)
  #18  pc 00000000001e05bf  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+790)
  #19  pc 00000000003e27af  /system/lib/libart.so (MterpInvokeStatic+130)
  #20  pc 0000000000400494  /system/lib/libart.so (ExecuteMterpImpl+14612)
  #21  pc 0000000000008e6a  /data/app/myapp.mobile.app-NMGEC5MygxTSkiehEoUA7A==/oat/arm/base.vdex (io.flutter.view.FlutterMain.a+10)
  #22  pc 00000000001c4d53  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2471763592+378)
  #23  pc 00000000001c937f  /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+82)
  #24  pc 00000000003d52b9  /system/lib/libart.so (artQuickToInterpreterBridge+880)
  #25  pc 0000000000411aff  /system/lib/libart.so (art_quick_to_interpreter_bridge+30)
  #26  pc 000000000040d575  /system/lib/libart.so (art_quick_invoke_stub_internal+68)
  #27  pc 00000000003e6c7b  /system/lib/libart.so (art_quick_invoke_static_stub+222)
  #28  pc 00000000000a1027  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+154)
  #29  pc 00000000001e5ae9  /system/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+236)
  #30  pc 00000000001e05d7  /system/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+814)
  #31  pc 00000000003e27af  /system/lib/libart.so (MterpInvokeStatic+130)
  #32  pc 0000000000400494  /system/lib/libart.so (ExecuteMterpImpl+14612)
  #33  pc 0000000000007b8a  /data/app/myapp.mobile.app-NMGEC5MygxTSkiehEoUA7A==/oat/arm/base.vdex (io.flutter.app.FlutterApplication.onCreate+6)
  #34  pc 00000000001c4d53  /system/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2471763592+378)
  #35  pc 00000000001c937f  /system/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+82)
  #36  pc 00000000003d52b9  /system/lib/libart.so (artQuickToInterpreterBridge+880)
  #37  pc 0000000000411aff  /system/lib/libart.so (art_quick_to_interpreter_bridge+30)
  #38  pc 000000000067a899  /system/framework/arm/boot-framework.oat (android.app.Instrumentation.callApplicationOnCreate+40)
  #39  pc 000000000075a4bb  /system/framework/arm/boot-framework.oat (android.app.ActivityThread.handleBindApplication+6626)
  #40  pc 0000000000756435  /system/framework/arm/boot-framework.oat (android.app.ActivityThread$H.handleMessage+5788)
  #41  pc 000000000090e329  /system/framework/arm/boot-framework.oat (android.os.Handler.dispatchMessage+136)
  #42  pc 0000000000910a23  /system/framework/arm/boot-framework.oat (android.os.Looper.loop+1162)
  #43  pc 000000000075f6b3  /system/framework/arm/boot-framework.oat (android.app.ActivityThread.main+674)
  #44  pc 000000000040d575  /system/lib/libart.so (art_quick_invoke_stub_internal+68)
  #45  pc 00000000003e6c7b  /system/lib/libart.so (art_quick_invoke_static_stub+222)
  #46  pc 00000000000a1027  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+154)
  #47  pc 0000000000347ac5  /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+52)
  #48  pc 0000000000348f15  /system/lib/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned int)+1024)
  #49  pc 00000000002fb0c5  /system/lib/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+40)
  #50  pc 000000000011226f  /system/framework/arm/boot.oat (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+110)
  #51  pc 0000000000a0a56b  /system/framework/arm/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+114)
  #52  pc 0000000000a10455  /system/framework/arm/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2836)
  #53  pc 000000000040d575  /system/lib/libart.so (art_quick_invoke_stub_internal+68)
  #54  pc 00000000003e6c7b  /system/lib/libart.so (art_quick_invoke_static_stub+222)
  #55  pc 00000000000a1027  /system/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+154)
  #56  pc 0000000000347ac5  /system/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+52)
  #57  pc 00000000003478ef  /system/lib/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+310)
  #58  pc 000000000028eb11  /system/lib/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+444)
  #59  pc 000000000006c93b  /system/lib/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+30)
  #60  pc 000000000006eb93  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+458)
  #61  pc 0000000000001989  /system/bin/app_process32 (main+728)
  #62  pc 000000000008ae6d  /system/lib/libc.so (__libc_init+48)
  #63  pc 000000000000166f  /system/bin/app_process32 (_start_main+38)
  #64  pc 0000000000000306  <anonymous>

这对我来说没有任何意义,我按照https://flutter.io/android-release/的部署说明进行操作,并试图一遍又一遍地找出发行版的问题。

我将引导您完成我所采取的非显而易见的步骤,并希望我能找到我的应用崩溃的原因

  1. 如果该应用不需要互联网,则删除android.permission.INTERNET;

    • 我之所以留在这里是因为我的应用程序上有一个链接,我希望人们单击该链接并转到浏览器;否则,该应用程序根本不需要互联网连接,并且应该能够在没有互联网的情况下运行。我不知道我是否必须保留它,所以我保留了它。
  2. minSdkVersion和targetSdkVersion的版本。

    • 我不确定在这里做什么。我在android studio上使用的SDK包括oreo(27)和28,因此我将最小值设置为16,将目标设置为28,并将compileSDK设置为28。
  3. 保护规则

    • 我有一个sqlite的flutter插件,名为“ package:sqflite / sqflite.dart”,并且想知道这些规则是否包括我拥有的sqlite flutter插件(看起来确实如此)

我的proguard-rules.pro中有这个

#Flutter Wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.**  { *; }
-keep class io.flutter.util.**  { *; }
-keep class io.flutter.view.**  { *; }
-keep class io.flutter.**  { *; }
-keep class io.flutter.plugins.**  { *; }

我没有用于自己查看崩溃的Android设备,我在Google Play(nexus 5,api 27,android 8.1)和api 28中使用的每个模拟器都说该应用程序不兼容使用Google Play商店中的设备。所以我无法在模拟器中重新创建它。

它在我所有运行android 9的测试仪手机上都崩溃了

如果您对崩溃的原因有任何了解,请告诉我,如果不是,我如何获取崩溃的堆栈跟踪信息,以便我可以继续找出发生这种情况的原因。

如果您需要查看我的文件,请发表评论

build.gradle(仅适用于Android)

android {
    compileSdkVersion 28

    lintOptions {
        disable 'InvalidPackage'
    }

    defaultConfig {
        applicationId "myapp.mobile.app"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 3
        versionName "Beta."
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }

    signingConfigs {
        release {
            keyAlias keystoreProperties['keyAlias']
            keyPassword keystoreProperties['keyPassword']
            storeFile file(keystoreProperties['storeFile'])
            storePassword keystoreProperties['storePassword']
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release

            minifyEnabled true
            useProguard true

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

flutter {
    source '../..'
}

dependencies {
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}

0 个答案:

没有答案