需要分析代码中关于线程的一些问题,于是就在Studio中写了一个java的Demo。写完编译运行发现报错了,错误代码如下:
"Process 'command 'C:\Java\jdk1.8\bin\java.exe'' finished with non-zero exit value 1"
这啥问题?没碰到过。于是就万能百度,网上给出了几个解决方案,总结来说,大概有三种:
1.打开build.gradle(Moudule:app) 在对应模块添加以下内容:
defaultConfig { ··· multiDexEnabled true }
2、打开build.gradle(Moudule:app) 在对应模块添加以下内容:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) //把这一行的compile改为provided
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
}
3、打开Project Structure把 Build Tools Version改为 23.0.1 !
第三种情况,这里暂不考虑。Compile sdk Version