[英]Could not get unknown property 'javaVersion' for object of type com.android.build.gradle.internal.CompileOptions
i am getting this error when i run my project.我在运行我的项目时收到此错误。 i am getting error in these two lines sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility javaVersion.VERSION_1_8 and i am changing these lines into sourceCompatibility JavaVersion.VERSION_1_2 targetCompatibility javaVersion.VERSION_1_2 but facing same error.
我在这两行中遇到错误 sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility javaVersion.VERSION_1_8 并且我将这些行更改为 sourceCompatibility JavaVersion.VERSION_1_2 targetCompatibility javaVersion.VERSION_1_2 但面临同样的错误。 i have android studio 2.2.3 this is my Gradle file.
我有 android studio 2.2.3,这是我的 Gradle 文件。
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.fcih.gp.furniturego"
minSdkVersion 17
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
debuggable true
}
}
compileOptions{
sourceCompatibility JavaVersion.VERSION_1_2
targetCompatibility javaVersion.VERSION_1_2
}
// compileOptions {
// sourceCompatibility JavaVersion.VERSION_1_8
// targetCompatibility JavaVersion.VERSION_1_8
// }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile(name: 'wikitudesdk', ext: 'aar')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.4.0'
compile 'com.android.support:exifinterface:25.4.0'
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support:customtabs:25.4.0'
compile 'com.android.support:support-v4:25.4.0'
compile 'com.android.support:recyclerview-v7:25.4.0'
compile 'com.android.support:cardview-v7:25.4.0'
compile 'com.google.firebase:firebase-database:11.0.1'
compile 'com.google.firebase:firebase-auth:11.0.1'
compile 'com.google.firebase:firebase-storage:11.0.1'
compile 'com.firebaseui:firebase-ui-database:2.0.1'
compile 'com.google.android.gms:play-services-auth:11.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.23.0'
compile 'com.twitter.sdk.android:twitter:3.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.makeramen:roundedimageview:2.3.0'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.7'
compile 'me.grantland:autofittextview:0.2.1'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.6'
compile 'com.koushikdutta.ion:ion:2.2.1'
}
repositories {
jcenter()
flatDir { dirs 'libs' }
}
apply plugin: 'com.google.gms.google-services'
change JavaVersion.VERSION_1_8 to 1.8将 JavaVersion.VERSION_1_8 更改为 1.8
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.