gpt4 book ai didi

android-studio - 无法获得gradle接受android studio 3中的java-client-6.0.0-BETA1.jar

转载 作者:行者123 更新时间:2023-12-03 18:00:07 27 4
gpt4 key购买 nike

我是android studio的新手。我正在尝试使用appium的java-client-6.0.0-BETA1.jar来构建Android Studio Gradle。我正在实施鸦片。我相信android studio已安装正确。我已经下载了appium的推荐文件,selenium-server-standalone-3.8.1.jar,selenium-remote-driver.jar,selenium-java-3.8.1.zip和其他我认为需要的文件。 Appium服务器已安装并正在运行。一个android模拟器正在运行。
我收到此错误:

Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Repositories\ApkProjects\EndToEndAndroidTest\app\libs\java-client-6.0.0-BETA1.jar
at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:550)
at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.lambda$convertToDexArchive$1(DexArchiveBuilderTransform.java:488)
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing io/appium/java_client/touch/TapOptions.class
The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
android {
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}

我尝试了推荐的修复程序-没什么区别。我已经更新了guava-23.3-android,它也给出了类似的错误。
gradle.build文件是:
    apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
applicationId "com.nwri.endtoendandroidtest"
minSdkVersion 18
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 {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
// compile 'com.google.guava:guava:23.3-android'
}

我已经在网上搜索过,找不到任何有此问题的人。如果有帮助,请看以下屏幕截图:
Android studio

最佳答案

在“项目结构”对话框中将Source CompatibilityTarget Compatibility设置为1.8可以帮助我。

手动添加时

android {
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}


没有帮助。

enter image description here

关于android-studio - 无法获得gradle接受android studio 3中的java-client-6.0.0-BETA1.jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47684133/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com