0
Android Studio 프로젝트에 Crashlytics 플러그인을 설치했지만 gradle 작업 인 crashlyticsUploadDistributionDebug가 gradle 작업에 추가되지 않았습니다. 작업을 그라데이션에 추가하려면 어떻게해야합니까?그라우트 작업에 크래시 틱스 작업을 추가 할 수 없습니다.
크래시 틱스 설치는 성공했지만 아래 명령은 실패합니다.
$ ./gradlew assembleDebug crashlyticsUploadDistributionDebug
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
FAILURE: Build failed with an exception.
* What went wrong:
Task 'crashlyticsUploadDistributionDebug' not found in root project 'MyProject'.
* Try:
Run gradlew tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1.02 secs
내 build.gradle 설정은 다음과 같습니다.
buildscript {
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.24.2'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 26
buildToolsVersion '25.0.3'
defaultConfig {
applicationId "my.app.id"
manifestPlaceholders = [appName:"@string/app_name", iconLabel:"@string/icon_label"]
minSdkVersion 16
targetSdkVersion 26
versionCode 20
versionName "2.0.0"
}
buildTypes {
debug {
debuggable true
applicationIdSuffix ".debug"
versionNameSuffix '-dev'
}
release {
debuggable false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
develop {
manifestPlaceholders = [appName:"@string/dev_app_name", iconLabel:"@string/dev_icon_label"]
buildConfigField "boolean", "DEV_ENV", "true"
buildConfigField "String", "XXX", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
staging {
manifestPlaceholders = [appName:"@string/stg_app_name", iconLabel:"@string/stg_icon_label"]
buildConfigField "boolean", "DEV_ENV", "true"
buildConfigField "String", "XXX", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
production {
buildConfigField "boolean", "DEV_ENV", "false"
buildConfigField "String", "XXX", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'com.google.code.gson:gson:2.7'
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.google.android.gms:play-services-analytics:11.0.4'
compile 'com.google.android.gms:play-services-gcm:11.0.4'
compile 'com.mcxiaoke.volley:library:1.0.16'
compile 'com.jpardogo.materialtabstrip:library:1.0.9'
compile 'com.lsjwzh:materialloadingprogressbar:0.5.5-RELEASE'
compile 'io.realm:realm-android:0.80.3'
compile 'com.github.ksoichiro:android-observablescrollview:1.5.2'
compile 'com.daimajia.swipelayout:library:[email protected]'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:[email protected]'
compile 'com.daimajia.androidanimations:library:[email protected]'
compile 'com.facebook.conceal:conceal:[email protected]'
compile 'com.appsflyer:af-android-sdk:[email protected]'
compile('com.crashlytics.sdk.android:crashlytics:[email protected]') {
transitive = true;
}
}
무엇이 잘못 되었나요?
이 자습서를 참조하면 도움이됩니다. https://www.numetriclabz.com/integrate-crashlytics-for-android-by-fabric-tutorial/ – Saneesh
언제든지 build.gradle을 공유 할 수 있습니까? 크래시 틱스와 패브릭을 구성하는 방법이 돋보이는 지 알고 싶습니다. – Alexizamerican
@Saneesh Crashlytics 설치는 성공했지만 gradle 작업 crashlyticsUploadDistributionDebug는 gradle 작업에 추가되지 않습니다. – tama