请不要认为这是任何其他旧职位的副本。
今天上午,我通过重构迁移到androidx,将我的一个旧应用程序迁移到androidx。
在此之后,我无法运行我的应用程序。我犯了个错误
任务“”的执行失败:app:transformclasseswithretrolambdafordebug'. org.gradle.api.tasks.compile.compileoptions.getbootclasspath()ljava/lang/string;
我试过很多其他与此相关的问题。例如:任务“”的执行失败:app:compileretrolambdadebug'
* Module
**apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 28 //tried with 29 also
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.solver.inventory"
minSdkVersion 21
targetSdkVersion 28
versionCode 2
versionName "Beta V2.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
vectorDrawables.useSupportLibrary true
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
//Use “exclude” to point at the specific file (or files) that Android Studio is complaining about//
exclude 'META-INF/rxjava.properties'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
retrolambda {
jvmArgs '-noverify'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation(name: 'customprint', ext: 'aar')
implementation 'com.github.KingsMentor:MobileVisionBarcodeScanner:2.0.0'
implementation 'androidx.appcompat:appcompat'
implementation "androidx.cardview:cardview:1.0.0"
implementation 'androidx.recyclerview:recyclerview'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'io.reactivex.rxjava2:rxjava:2.1.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.okhttp3:okhttp:3.8.1'
implementation 'com.mcxiaoke.volley:library:1.0.6'
implementation 'org.apache.commons:commons-io:1.3.2'
implementation 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:0.4.0'
implementation 'com.getbase:floatingactionbutton:1.10.1'
implementation 'com.google.firebase:firebase-messaging:21.0.1'
implementation 'com.annimon:stream:1.2.1'
implementation 'com.itextpdf:itextpdf:5.0.6'
implementation 'com.airbnb.android:lottie:2.5.5'
implementation('androidx.room:room-runtime:2.0.0') {
exclude group: 'com.android.support'
}
implementation('androidx.room:room-rxjava2:2.0.0') {
exclude group: 'com.android.support'
}
annotationProcessor 'androidx.room:room-compiler:2.0.0'
testImplementation 'junit:junit:4.12'
implementation 'com.itextpdf:itextpdf:5.5.13'
implementation 'com.itextpdf.tool:xmlworker:5.4.1'
}
repositories {
flatDir {
dirs 'libs'
}
}
apply plugin: 'com.google.gms.google-services'**
- 项目
buildscript {
repositories {
jcenter()
}
repositories {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'me.tatarka:gradle-retrolambda:3.7.0' //Tried 3.7.1 also
classpath 'com.google.gms:google-services:4.3.4'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我试过各种链接的说明。但我还是犯了同样的错误。
谁能帮我解决这个问题。。。。。。请
暂无答案!
目前还没有任何答案,快来回答吧!