我正在编写一个 Android Studio 项目,同时使用 USB 内存棒不断地在笔记本电脑和台式机之间来回移动。自从 Android Studio 稳定以来,我尝试了几个月都没有问题,直到今天,无论我同步 gradle 多少次,此消息都会一直显示:
Gradle files have changed since last project sync. A project sync may be necessary for the IDE to work properly.
Gradle Console 表示构建成功。我也尝试清理和重建项目,甚至重新安装Android Studio,仍然弹出消息。
似乎是什么问题?不建议在多个Android Studio上写一个项目吗?
这是我的 build.gradle 的外观:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.simplifyinc.prodigy"
minSdkVersion 16
targetSdkVersion 21
versionCode 1
versionName "0.3.2"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'com.oguzdev:CircularFloatingActionMenu:1.0.2'
compile 'net.the4thdimension:audio-wife:1.0.3'
compile project('libraries:android-crop')
}
最佳答案
在 build.gradle(module:app)
改变
构建工具,(在我的例子中是 23.0.1)
targetSdkVersion (23) 和
依赖
编译版本
(“com.android.support:appcompat-v7:23.1.0”)
最新
这是由于 gradle 更新而发生的
*****检查你的电脑日期*****
关于android - "Gradle files have changed since last project sync."消息总是出现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28634836/