これは私のbuild.gradleファイルです:
buildscript {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://maven.google.com' }
maven { url 'http://dl.bintray.com/amulyakhare/maven' }
maven { url 'https://jcenter.bintray.com/' }
maven { url "https://jitpack.io" }
mavenCentral()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath "io.realm:realm-gradle-plugin:3.2.0"
classpath 'com.google.gms:google-services:3.1.0' // google-services plugin
}
}
apply plugin: 'com.Android.application'
apply plugin: 'io.fabric'
apply plugin: 'realm-Android'
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
maven { url 'http://dl.bintray.com/amulyakhare/maven' }
maven { url 'https://jcenter.bintray.com/' }
maven { url "https://jitpack.io" }
maven {
url 'https://maven.google.com'
}
}
Android {
compileSdkVersion 27
buildToolsVersion '27.1.1'
defaultConfig {
applicationId "nl.hgrams.passenger"
minSdkVersion 17
targetSdkVersion 23
versionCode 905
versionName '3.2'
multiDexEnabled true
}
sourceSets {
main {
Java {
exclude 'nl.hgrams.passenger.activities.PSSimilarTripsGroupActivity'
exclude 'nl.hgrams.passenger.activities.PSTripStatsActivity'
}
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
dexOptions {
preDexLibraries = false
javaMaxHeapSize "4g"
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
ext.enableCrashlytics = true
ext.betaDistributionReleaseNotesFilePath = "/Users/gopublic/bamboo-home/xml-data/build-dir/131073/PAS-PAD-VRANDROID/changelog.txt"
ext.betaDistributionEmails = "[email protected], [email protected], [email protected]"
ext.betaDistributionGroupAliases = "passenger-Android-beta"
}
debug {
minifyEnabled false
shrinkResources false
ext.enableCrashlytics = true
ext.betaDistributionEmails = "[email protected], [email protected], [email protected]"
ext.betaDistributionReleaseNotesFilePath = "/Users/gopublic/bamboo-home/xml-data/build-dir/131073/PAS-PAD-VRANDROID/changelog.txt"
ext.betaDistributionGroupAliases = "passenger-Android-beta"
}
}
}
dependencies {
implementation 'com.Android.support:multidex:1.0.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.Android.support:appcompat-v7:27.1.1'
implementation 'com.Android.support:design:27.1.1'
implementation 'com.Android.support:percent:27.1.1'
implementation 'com.Android.support:recyclerview-v7:27.1.1'
implementation 'com.Android.support:transition:27.1.1'
implementation 'com.google.code.gson:gson:2+'
implementation 'com.Android.volley:volley:1+'
implementation 'com.squareup.okhttp:okhttp:2.0.0+'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.google.Android.gms:play-services-maps:11.8.0'
implementation 'com.google.Android.gms:play-services-location:11.8.0'
implementation 'com.google.Android.gms:play-services-gcm:11.8.0'
implementation 'com.google.Android.gms:play-services-analytics:11.8.0'
implementation 'com.google.Android.gms:play-services-auth:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation files('libs/nineoldandroids-2.4.0.jar')
implementation files('libs/okhttp-urlconnection-2.0.0.jar')
implementation 'com.edmodo:cropper:1.0.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'com.google.maps.Android:android-maps-utils:0.4+'
implementation 'com.instabug.library:instabug:4.2.6'
implementation 'io.reactivex:rxjava:1.1.0'
implementation 'com.plattysoft.leonids:LeonidsLib:1.3.1'
implementation 'io.smooch:core:latest.release'
implementation 'io.smooch:ui:latest.release'
implementation "com.daimajia.swipelayout:library:1.2.0@aar"
implementation 'com.squareup.okhttp3:okhttp:3.2.0'
implementation 'com.squareup.retrofit:retrofit:1.9.0'
implementation 'com.bartoszlipinski:recyclerviewheader2:2.0.1'
implementation 'io.branch.sdk.Android:library:2.+'
implementation 'com.github.2359media:EasyAndroidAnimations:0.8'
implementation 'me.grantland:autofittextview:0.2.+'
implementation 'com.github.kaknazaveshtakipishi:PermissionEverywhere:1.0.2'
implementation('com.crashlytics.sdk.Android:crashlytics:2.8.0@aar') {
transitive = true;
}
implementation(
[group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.4.1'],
[group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.4.1'],
[group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.4.1']
)
implementation 'devlight.io:navigationtabbar:1.2.5'
implementation 'org.Apache.commons:commons-lang3:3.4'
implementation 'com.Android.support.constraint:constraint-layout:1.0.2'
implementation 'com.yahoo.mobile.client.Android.util.rangeseekbar:rangeseekbar-library:0.1.0'
implementation 'commons-io:commons-io:2.4'
implementation 'com.facebook.Android:facebook-Android-sdk:[4,5)'
}
apply plugin: 'com.google.gms.google-services'
私はこのエラーを受け取ります:
Failed to find Build Tools revision 27.1.1
Install Build Tools 27.1.1 and sync project
ビルドツールをインストールするためにを押した場合27.1.1。ダウンロードできないエラーが表示されます:
https://s3.amazonaws.com/uploads.hipchat.com/39260/829560/ECeAJ5Gi0GQnjoZ/upload.png
なんでこんなことが起こっているの?以前は26.1.1で動作していましたが、Android Studio 3.1に更新したため、27.0.3が最低限動作すると言って、そのバージョンを使用できません。しかし、試してみました。 27.0.3と27.1.1で、常にコンパイルエラーが発生します
公式ドキュメント を参照すると、実際のリリースは次のとおりです。
Android {
buildToolsVersion "27.0.3"
...
}
27.1.1
ではなく
したがって、Androidノードを
Android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
.....
Android SDKマネージャーによると、ビルドツールの最新バージョンは27.0.3および28.0.0-rc1です。
27.1.1はサポートライブラリのバージョンです。