ben*_*iku 12 android gradle android-ndk crashlytics-android google-fabric
在这被标记为重复之前,我已经尝试了所有可能的问题。Java 崩溃会正确报告,但是来自本机库的崩溃没有调试符号。
我试过的:
./gradlew crashlyticsUploadSymbolsDevDebug // to upload the symbols manually
androidNdkOut 'build/intermediates/ndkBuild/devDebug/obj/local' //specify the ndk paths manually
androidNdkLibsOut 'build/intermediates/merged_native_libs/devDebug/out/lib'` //specify the ndk paths manually
Run Code Online (Sandbox Code Playgroud)
当前设置:
依赖项:
implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') { transitive = true }
implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.1.1'
android.applicationVariants.all { variant ->
def variantName = variant.name.capitalize()
def task = task("ndkbuild${variantName}")
task.finalizedBy("crashlyticsUploadSymbols${variantName}")
}
crashlytics {
enableNdk true
manifestPath 'AndroidManifest.xml'
androidNdkOut 'build/intermediates/ndkBuild/devDebug/obj/local'
androidNdkLibsOut 'build/intermediates/merged_native_libs/devDebug/out/lib'
}
Run Code Online (Sandbox Code Playgroud)
结构依赖:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
// The Fabric Gradle plugin uses an open ended version to react
// quickly to Android tooling updates
classpath 'io.fabric.tools:gradle:1.31.2'
}
}
Run Code Online (Sandbox Code Playgroud)
Fabric 已设置并使用 Java 层崩溃。
Fabric.Builder builder = new Fabric.Builder(this).kits(new Crashlytics(), new
CrashlyticsNdk());`
Run Code Online (Sandbox Code Playgroud)
问题:本机崩溃被报告但调试符号丢失,没有错误/输出表明它们为什么丢失。
我制作了一个示例应用程序,以便能够更轻松地重现这一点。您所要做的就是在 firebase 中创建一个项目并粘贴 google-services.json 文件并构建。 链接到回购
尝试像这样配置它:
crashlytics {
enableNdk true
// If using the Android plugin for Gradle version 2.2.0+ with the externalNativeBuild DSL,
// you should remove the androidNdkOut and androidNdkLibsOut properties, as these paths will
// automatically be detected by the Fabric plugin.
androidNdkOut 'obj'
androidNdkLibsOut 'libs'
manifestPath 'AndroidManifest.xml'
}
Run Code Online (Sandbox Code Playgroud)
但是,您最好迁移到Firebase Crashlytics,因为 Fabric 很快就会将其关闭:
Crashlytics 已集成到 Firebase 中,并具有仅限 Firebase 的新功能。新应用应使用 Firebase 中的 Crashlytics 来访问最新的更新和功能。Fabric Crashlytics 和 Fabric 仪表板将于 2020 年 3 月 31 日之前对现有用户开放。
| 归档时间: |
|
| 查看次数: |
722 次 |
| 最近记录: |