我已经使用iOS成功部署到TravisCI的Crashlytics,现在我正在处理我们的Android项目。
我看过这个链接:http://support.crashlytics.com/knowledgebase/articles/388925-beta-distributions-with-gradle
以及此stackoverflow帖子:Automatic Beta Releases with crashlytics
但我没有使用任何口味(但)我得到同样的错误:
Task 'crashlyticsUploadDistributionRelease' not found in root project 'FezzeeAndroid'.
这是我的build.gradle:
buildscript {
repositories {
jcenter()
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.13.0'
}
}
apply plugin: 'crashlytics'
allprojects {
repositories {
mavenCentral()
maven { url 'http://download.crashlytics.com/maven' }
}
}
这是我的.travis.yml
language: android
android:
components:
- android-21
- build-tools-21.1.2
before_install:
# for gradle output style
- export TERM=dumb
# environment info
- ./gradlew -v
- uname -a
# Let's try to build...
script:
- ./gradlew tasks --all
- ./gradlew --stacktrace assembleRelease crashlyticsUploadDistributionRelease
我应该注意./gradlew任务 - 所有
./gradlew tasks --all
不会显示名为
的任务
crashlyticsUploadDistributionRelease
答案 0 :(得分:0)
这是我的build.gradle for crashlytics,它可以运行
buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.android.tools.build:gradle:+'
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'crashlytics'
repositories {
maven { url 'http://download.crashlytics.com/maven' }
}
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.android....."
minSdkVersion 11
targetSdkVersion 21
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
testApplicationId "com.android.......test"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.crashlytics.android:crashlytics:1.+'
}