android初心者です。
android_studioで実機(nexsus9(バージョン(7.1.1)))で独自のアプリを起動させたいが、syncはできるが、ビルドがうまくいかない
※実機のデバイス(HTC NRXSUS9 android7.1.1, API25)
現象
まず、android studioを最新(3.1.3)にupdateしました。
そこでprojectと同期時は問題なく完了し、実機、またはエミュレーター(nexsus9 api28)でdebug実行時、コンパイルエラーが出てしまっていて、対処法がわかりません。
御教授願いたいです。
app/build_gradle
”””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies { classpath 'io.fabric.tools:gradle:1.+' }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'me.tatarka.retrolambda'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
def APPNAME = "省略"
android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
defaultConfig {
minSdkVersion 21
targetSdkVersion 21
versionCode 7
versionName '20171026'
multiDexEnabled true
ndk {
abiFilters 'x86', 'armeabi-v7a'
}
}
flavorDimensions "service"
externalNativeBuild { cmake { path 'CMakeLists.txt' } } dataBinding { enabled = true } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } buildTypes { debug { applicationIdSuffix ".debug" buildConfigField 'boolean', 'DEBUG_UI', 'true' buildConfigField 'String', 'BASE_URL', '省略' buildConfigField 'String', 'BASE_URL_CONTENTS', '省略' } release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' buildConfigField 'boolean', 'DEBUG_UI', 'false' buildConfigField 'String', 'BASE_URL', '省略' buildConfigField 'String', 'BASE_URL_CONTENTS', '省略' } } productFlavors { treasurebox { applicationId '省略' manifestPlaceholders = [appName: "${APPNAME}"] buildConfigField 'String', 'APP_ID', '\"zLeYTK8S5kJC5bjT\"' versionCode 13 versionName '20180412' dimension "service" } wiz { applicationId '省略' manifestPlaceholders = [appName: "${APPNAME} Wiz"] buildConfigField 'String', 'APP_ID', '\"1NzcfgEBTZ2sKG1M\"' versionCode 13 versionName "1.3.4" dimension "service" } } useLibrary 'org.apache.http.legacy' applicationVariants.all { variant -> if (variant.buildType.name.equals("release")) { variant.outputs.all { output -> if (output.outputFile != null && output.outputFile.name.endsWith('.apk')) { // Rename APK def appName = "app" def versionCode = versionCode def versionName = versionName def newName = "${appName}_r${versionCode}_v${versionName}.apk" outputFileName = newName } } } }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.squareup.retrofit2:retrofit:2.2.0'
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.6.0'
compile 'com.google.code.gson:gson:2.7'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.facebook.stetho:stetho:1.3.1'
compile 'com.facebook.stetho:stetho-okhttp3:1.3.1'
compile 'io.reactivex.rxjava2:rxjava:2.0.5' compile 'io.reactivex.rxjava2:rxandroid:2.0.1' compile 'com.airbnb.android:lottie:2.0.0-beta4' compile 'uk.co.chrisjenx:calligraphy:2.2.0' compile 'com.jakewharton.threetenabp:threetenabp:1.0.5' compile 'com.jakewharton.timber:timber:4.5.1' compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') { transitive = true; } compile 'io.intercom.android:intercom-sdk-base:3.+' compile 'io.intercom.android:intercom-sdk-fcm:3.+' compile 'org.apache.commons:commons-lang3:3.5' testCompile 'junit:junit:4.12' androidTestCompile 'com.android.support:support-annotations:25.3.1' androidTestCompile 'com.android.support.test:runner:0.5'
}
”””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””””
”””””””””””””””””””””””””
gradle version 4.1
プラグイン version 3.0.1
”””””””””””””””””””””””””
エラーメッセージ
Could not find com.android.databinding:compiler:3.0.1.
Searched in the following locations:
file:/./Android/sdk/extras/m2repository/com/android/databinding/compiler/3.0.1/compiler-3.0.1.pom
file:/./Android/sdk/extras/m2repository/com/android/databinding/compiler/3.0.1/compiler-3.0.1.jar
file:/Users/kubotaichi/Library/Android/sdk/extras/google/m2repository/com/android/databinding/compiler/3.0.1/compiler-3.0.1.pom
file:/./Android/sdk/extras/google/m2repository/com/android/databinding/compiler/3.0.1/compiler-3.0.1.jar
file:/./Android/sdk/extras/android/m2repository/com/android/databinding/compiler/3.0.1/compiler-3.0.1.pom
file:/./Android/sdk/extras/android/m2repository/com/android/databinding/compiler/3.0.1/compiler-3.0.1.jar
https://jcenter.bintray.com/com/android/databinding/compiler/3.0.1/compiler-3.0.1.pom
https://jcenter.bintray.com/com/android/databinding/compiler/3.0.1/compiler-3.0.1.jar
https://maven.fabric.io/public/com/android/databinding/compiler/3.0.1/compiler-3.0.1.pom
https://maven.fabric.io/public/com/android/databinding/compiler/3.0.1/compiler-3.0.1.jar
Required by:
project :app