我的项目突然显示了这条消息
Gradle files have changed since last project sync. A project sync might be necessary for the IDE to work properly后面有“立即同步”的链接。(虽然我还没有编辑gradle文件)
但是,无论我单击了多少次Sync now、重新构建项目或创建项目,它都会再次显示相同的消息,并且显示:
Grade build finished in 3s ...etc当我检查日志时,它只显示Gradle同步已完成。我也不能运行这个项目,因为它只显示目标设备,仅此而已。
我还尝试删除.idea文件夹,但没有影响
编辑: my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.evently.pianomar.evently"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:support-v4:23.3.0'
compile 'com.squareup.retrofit2:retrofit:2.0.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.0'
compile 'org.glassfish:javax.annotation:10.0-b28'
compile 'joda-time:joda-time:2.9.2'
}发布于 2017-11-30 15:43:44
我也遇到了类似的问题,下面是我如何解决它的:我注意到我的时间和日期不正确,所以我更新了它们,然后重新构建了项目,它起作用了!
https://stackoverflow.com/questions/36856675
复制相似问题