首先请看我的毕业档案。
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.2"
defaultConfig {
applicationId "com.example.name.webrtcwork"
minSdkVersion 17
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true
}
sourceSets.main {
jniLibs.srcDir 'libs'
jni.srcDirs = [] //disable automatic ndk-build call
}
}
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:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.myhexaville:smart-image-picker:1.0.4'
compile 'pub.devrel:easypermissions:1.1.3'
compile('io.socket:socket.io-client:1.0.0') {
exclude group: 'org.json', module: 'json'
}
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile files('libs/autobanh.jar')
compile files('libs/base_java.jar')
compile files('libs/libjingle_peerconnection.jar')
testCompile 'junit:junit:4.12'
}
项目清理和重建工作成功,但如果我想运行该应用程序,我得到这样的错误。
原因:Dex无法解析版本52字节代码。
如果您在库子模块中使用“java”gradle插件,请添加
targetCompatibility='1.7'
sourceCompatibility='1.7'
到那个子模块的构建.gradle文件。
错误:1个错误;中止
com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException:无法预索引'/Users/Hayk.Mkrtchyan/.android/build-缓存/7fd66238e8a360302161a82746a2b9f0a8b83132/output/jars/classes.jar'到'/用户/Hayk.Mkrtchyan/Desktop/WebRTCWork/app/build/intermediates/pre-dexed/debug/classes_547e5465c50bca12a58d5755bafa9d6a0538b52.jar'
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
在我的生成文件中。这不管用。
我不想添加版本1.8,也不想将我的android studio版本升级到3.0。我怎样才能解决这个问题?
Error:Execution failed 对于任务':app:transformClassesWithPreJackPackagedLibrariesForDebug'.
无法从生成工具加载Jill。
我怎样才能解决这个问题?