1
これは私の友人で、Androidを使用していたときに開発したプロジェクトですStudio 2.3.1。 Android Studio 3.0にアップグレードした後。このエラーが発生しました:この予期しないエラーのためAndroidスタジオを3.0にアップグレードした後、 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;'メソッドを見つけることができません
Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;'.
考えられる原因は次のとおりです。
- のGradleの依存関係のキャッシュが壊れている可能性があります(これは時々、ネットワーク接続のタイムアウトの後に発生します。)
再ダウンロードの依存関係と同期プロジェクトを(
- Gradleビルドプロセス(デーモン)の状態が壊れている可能性があります。すべてのGradleデーモンを停止すると、この問題が解決される可能性があります。 Gradleビルドプロセスを停止します(再起動が必要です)
- プロジェクトには、プロジェクトの他のプラグインまたはプロジェクトによって要求されたGradleのバージョンと互換性のないサードパーティのプラグインが使用されている可能性があります。
私はここでエラーとその解決策をたくさん読んで、私は私がext.kotlin_version = '1.1.2-4'
を変えた出来事に気づいたが、ここで
を助けないのGradleスクリプトです:
buildscript {
ext.kotlin_version = '1.1.2-4'
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha1'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.7.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath "org.jetbrains.kotlin:kotlin-gradle-
plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they
belong
// in the individual module build.gradle files
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir}
apply plugin: 'com.android.application'
apply plugin: 'com.jakewharton.butterknife'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.joinme"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.google.android.gms:play-services-vision:8.1.0'
compile 'com.android.support:design:23.0.0'
compile 'io.reactivex:rxjava:1.0.14'
compile 'io.reactivex:rxandroid:1.0.1'
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.jakewharton:butterknife:8.7.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
compile 'com.android.support:cardview-v7:21.0.0'
compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'me.itangqi.waveloadingview:library:0.3.5'
testCompile 'junit:junit:4.12'
}
を使用し、どうもありがとうございました! – kolibreath
これはライブラリモジュールでは機能しません – issamux