簡體   English   中英

Gradle同步問題

[英]Gradle Sync issue

我的項目無處不在顯示消息

Gradle files have changed since last project sync. A project sync might be necessary for the IDE to work properly

后面帶有“立即同步”鏈接。 (盡管我還沒有編輯gradle文件)

但是,無論我單擊“立即同步”,重建項目還是進行同步,無論它多少次,它都只會再次顯示相同的消息,並且顯示:

Grade build finished in 3s ...etc

當我檢查日志時,它只是說Gradle同步已完成。 我也無法運行該項目,因為它僅顯示目標設備,僅此而已。

我也試圖刪除不會影響的.idea文件夾

編輯:我的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'
}

我也遇到了類似的問題,下面是解決問題的方法:我注意到我的時間和日期不正確,因此我對其進行了更新,然后重新構建了該項目,它就起作用了!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM