库中无法运行文件的问题

时间:2019-01-30 05:26:53

标签: automation appium-android android-studio-3.3

运行项目时,我在build.Gradle文件中遇到问题

构建屏幕(错误) 构建失败1 m 18 s 819 ms 运行版本1 m 18 s 680 ms 载入建立34毫秒 配置版本275毫秒 计算任务图152毫秒 运行任务1 m 18 s 208 ms

com.android.builder.dexing.DexArchiveBuilderException:无法处理 /home/sevenbits/AndroidStudioProjects/MyApplication/app/libs/java-client-7.0.0.jar com.android.builder.dexing.DexArchiveBuilderException:解密时出错。
com.android.tools.r8.CompilationFailedException:编译无法完成

com.android.tools.r8.utils.AbortException :错误:接口io.appium.java_client.MobileCommand(classpath class)用作io.appium.java_client.android.AndroidMobileCommandHelper的超类。

/ home / sevenbits / AndroidStudioProjects / MyApplication ../../.gradle/caches/modules-2/files-2.1/com.google.guava/guava/27.0.1-android/b7e1c37f66ef193796ccd7ea6e80c2b05426182d/guava-27.0.1-android.jar
**未找到类型sun.misc.Unsafe,这是void** com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper.<clinit>()终止的默认或静态接口方法所必需的

build.gradle文件:

应用插件:“ com.android.application”

android {     编译版本28     defaultConfig {         applicationId“ com.example.myapplication”         minSdkVersion 17         targetSdkVersion 28         版本代码1         versionName“ 1.0”         testInstrumentationRunner“ android.support.test.runner.AndroidJUnitRunner”          multiDexEnabled是

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
    }


}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}

}

依赖性{

implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint- 
 layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
/*testImplementation 'junit:junit:4.12'*/
testImplementation 'org.assertj:assertj-core:2.0.0'
testImplementation 'org.testng:testng:6.9.10'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 
'com.android.support.test.espresso:espresso-core:3.0.2'
implementation files('libs/apache-mime4j-0.6.jar')
implementation files('libs/commons-codec-1.10.jar')
implementation files('libs/commons-collections-3.2.1.jar')
implementation files('libs/commons-exec-1.3.jar')
implementation files('libs/commons-io-2.4.jar')
implementation files('libs/commons-lang3-3.4.jar')
implementation files('libs/commons-logging-1.1.3.jar')
implementation files('libs/commons-validator-1.4.1.jar')
implementation files('libs/gson-2.3.1.jar')
implementation files('libs/guava-21.0.jar')
// implementation 'com.google.guava:guava:25.0-android'
implementation files('libs/hamcrest-core-1.3.jar')
implementation files('libs/httpclient-4.4.1.jar')
implementation files('libs/httpcore-4.4.1.jar')
implementation files('libs/httpmime-4.4.1.jar')
implementation files('libs/java-client-3.2.0.jar')
implementation files('libs/junit-4.12.jar')
implementation files('libs/selenium-java-2.47.1.jar')
implementation files('libs/java-client-7.0.0.jar')
implementation files('libs/selenium-server-standalone-3.141.59.jar')
implementation 'com.google.guava:guava:24.1-jre'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.guava:guava:27.0.1-android'

}

它应该构建gradle文件而没有任何问题

0 个答案:

没有答案