您好,在Android应用程序中安装了crashlytics之后,我已经能够使用Java中的stacktrace成功检测到崩溃。但是,在设置了NDK之后,我在Crashlytics上的堆栈跟踪只说:
0 libc.so(丢失)
1个libart.so(丢失)
2 libnative-lib.so(遗漏)
3 libc.so(丢失),等等,没有符号。...
我经历过:https://docs.fabric.io/android/crashlytics/ndk.html,https://fabric.io/downloads/gradle/ndk,并确保运行./gradlew crashlyticsUploadSymbolsRelease
。另外,我的MainActivity.java文件中有Fabric.with(this, new Crashlytics(), new CrashlyticsNdk());
行。有人知道我可能会想念什么吗?
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
// The Fabric Gradle plugin uses an open ended version to react
// quickly to Android tooling updates
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 26
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.example.crashapp"
minSdkVersion 16
targetSdkVersion 26
externalNativeBuild {
cmake {
cppFlags "-std=c++14 -frtti -fexceptions"
}
}
}
buildTypes {
release {
minifyEnabled false
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
}
crashlytics {
enableNdk true
androidNdkOut 'build/intermediates/cmake/debug/obj'
androidNdkLibsOut 'build/intermediates/cmake/release/obj'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.0.5'
}