android - Crashlytics with Hello Jni App -
i got issues crashlytics. think cannot set crashlytics androidndkout , androidndklibsout paths.
first question gradle's default output path ndk according gradle settings ? second if settings correct why saw ndk errors "???" on crashlytics dashboard?
here app build.gradle
// top-level build file can add configuration options common sub-projects/modules. buildscript { repositories { jcenter() maven { url 'https://maven.fabric.io/public' } } dependencies { classpath 'com.android.tools.build:gradle:2.2.0' classpath 'io.fabric.tools:gradle:1.21.7' } } allprojects { repositories { jcenter() maven { url 'https://maven.fabric.io/public' } } } task clean(type: delete) { delete rootproject.builddir }
here module's build.gradle:
apply plugin: 'com.android.application' apply plugin: 'io.fabric' android { compilesdkversion 24 buildtoolsversion '23.0.3' defaultconfig { applicationid "com.test.crashlyticsndktest" minsdkversion 15 targetsdkversion 24 versioncode 1 versionname "1.0" testinstrumentationrunner "android.support.test.runner.androidjunitrunner" ndk { modulename "crashlytics-jni" abifilters "armeabi" cflags "-g" } } } crashlytics { enablendk=true androidndkout getprojectdir().absolutepath +'/build/intermediates/ndk/debug/lib' //androidndkout "src/main/obj" androidndklibsout getprojectdir().absolutepath + "/build/intermediates/ndk/debug/obj/local" //androidndklibsout "src/main/jnilibs" } dependencies { compile filetree(include: ['*.jar'], dir: 'libs') androidtestcompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:24.2.1' compile 'com.android.support:design:24.2.1' testcompile 'junit:junit:4.12' compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') { transitive = true; } compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.5@aar') { transitive = true; } }
here proguard file:
-keep public class * extends java.lang.exception -keep class com.crashlytics.** { *; } -dontwarn com.crashlytics.** -keepattributes sourcefile,linenumbertable,annotation -keep class com.crashlytics.android.**
and here activity's fabric code:
fabric.with(this, new crashlytics(),new crashlyticsndk());
matt here fabric team!
i wanted let know we've released version 1.23.0 of fabric plugin gradle supports automatically resolving appropriate native library paths when you're using android gradle plugin 2.2.0+ externalnativebuild
dsl, no longer have set androidndkout
, androidndklibsout
if you're using latest android gradle plugin. should ndk symbols uploaded correctly , improve stack traces!
Comments
Post a Comment