Android 升级到3.4.2后无法运行项目
我将gradle构建工具升级为Android 升级到3.4.2后无法运行项目,android,android-gradle-plugin,Android,Android Gradle Plugin,我将gradle构建工具升级为 classpath 'com.android.tools.build:gradle:3.4.2' 但从那时起,我无法运行该项目,并得到错误 com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Cannot parse result path string: at com.google.common.cache.Lo
classpath 'com.android.tools.build:gradle:3.4.2'
但从那时起,我无法运行该项目,并得到错误
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Cannot parse result path string:
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2048)
at com.google.common.cache.LocalCache.get(LocalCache.java:3850)
当我将gradle更改为3.4.1版时,效果非常好。可能是什么问题
编辑:
我的项目build.gradle
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
而appbuild.gradle是
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "x.x.x."
minSdkVersion 22
targetSdkVersion 28
versionCode 2
versionName "1.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled = true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
resValue("string", "PORT_NUMBER", "8081")
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
implementation 'com.google.dagger:dagger-android-support:2.19'
implementation 'com.jakewharton:butterknife:10.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
implementation "androidx.lifecycle:lifecycle-runtime:2.0.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.0.0"
implementation "androidx.room:room-runtime:2.2.0-alpha02"
debugImplementation 'com.amitshekhar.android:debug-db:1.0.6'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.3.0-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha02'
annotationProcessor "androidx.room:room-compiler:2.2.0-alpha02"
annotationProcessor 'com.google.dagger:dagger-android-processor:2.19'
annotationProcessor 'com.google.dagger:dagger-compiler:2.19'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
}
共享您的模块和应用程序build.gradlefiles@YashKrishanVerma“运行项目”是指在设备或模拟器上构建或运行吗?@YashKrishanVerma building。。当我将gradle版本更改为3.4.1时工作正常,您以前使用的是3.4.1吗?或任何其他版本?共享您的模块和应用程序build.gradlefiles@YashKrishanVerma“运行项目”是指在设备或模拟器上构建或运行吗?@YashKrishanVerma building。。当我将gradle版本更改为3.4.1时工作正常,您以前使用的是3.4.1吗?还是其他版本?