[英]Incompatible magic value with Android Studio
I'm working with Android Studio 1.2.2 and when I want to sync my project, it shows: 我正在使用Android Studio 1.2.2,当我想同步项目时,它显示:
"Error:Incompatible magic value 2586042913 in class file asLocalRepo1_9h0wx5r1a0kgvu546dwv1hdh8"
“错误:类文件asLocalRepo1_9h0wx5r1a0kgvu546dwv1hdh8中的魔术值2586042913不兼容”
Each time I try to sync again the number of the repo increases (asLocalRepo2_1dhgml..., asLocalRepo3_gfd5..., ...)
每次我尝试再次同步时,回购的数量都会增加
(asLocalRepo2_1dhgml..., asLocalRepo3_gfd5..., ...)
I know that when a magic value is incompatible it means the file is corrupted, but I don't know which file. 我知道,当魔术值不兼容时,意味着文件已损坏,但我不知道哪个文件。
I had the exact same problem and this fixed it right away 我遇到了完全相同的问题,并且马上解决了
answer form this question: How to set -source 1.7 in Android Studio and Gradle 回答这个问题: 如何在Android Studio和Gradle中设置-source 1.7
I added this to build.gradle 我将此添加到build.gradle
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
So now i have this: 所以现在我有了这个:
android {
compileSdkVersion 19
buildToolsVersion "19.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 19
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.