将项目从一个系统移动到另一个系统后出现此错误
我不知道我的项目发生了什么问题
Clean
我们的项目但没有任何事情发生。libs
文件夹buil.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.app.poolblockchain"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/']
} }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.volley:volley:1.0.0'
compile 'io.jsonwebtoken:jjwt:0.6.0'
compile 'com.intuit.sdp:sdp-android:1.0.4'
compile files('src/main/java/libs/httpclient-4.3.6.jar')
compile files('src/main/java/libs/httpcore-4.3.3.jar')
compile files('src/main/java/libs/httpmime-4.3.jar')
compile 'id.zelory:compressor:1.0.4'
}
答案 0 :(得分:1)
据我所知,这是因为你的$ JAVA_HOME没有设置。如果您使用的是Mac:
导出JAVA_HOME =" /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
对于Windows,您可以参考此视频。 (信用归于其合法所有者)
答案 1 :(得分:0)
我在长途跋涉后删除了这个错误
.gradle
文件夹C:\Users\Administrator\AppData\Local\Android\sdk
.gradle
invalidate and cache restart