发生问题评估项目:':app'

时间:2017-03-19 11:09:02

标签: android android-studio

每当我尝试启动应用程序时,它会打开“编辑配置”窗口而不是启动它,并且它会显示错误:“Gradle Project Sync失败。请修复您的项目并重试”< / p>

所以我正在尝试清理/重建项目,并且我一直收到此错误:

  

错误:(5,1)评估项目':app'时出现问题。

     

无效修订:24.0.two

点击它时,会打开我的build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.two"
    defaultConfig {
        applicationId "com.example5.user.tapper"
        minSdkVersion 18
        targetSdkVersion 24
        versionCode 1
        versionName "one.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:two.two.two', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:24.two.0'
    compile 'com.android.support:support-v4:24.two.0'
    compile 'com.android.support.constraint:constraint-layout:one.0.0-alpha8'
    testCompile 'junit:junit:4.12'
}

2 个答案:

答案 0 :(得分:0)

将此buildToolsVersion "24.0.two"更改为buildToolsVersion "24.0.2"并再次同步。

答案 1 :(得分:0)

感谢@fluffyBatman,我找到了一个解决方案:

我将3张图片上传到@drawables,名为“1.png”,“2. png”和“3.png”,并将其重命名为“one.png”,“two.png”等。现在,我可能会意外地按下了一些东西,将我项目中的整个“1”/“2”/“3”改为“一个”,“两个”,“三个”,

所以:我只是将build.gradle中的所有“one”,“two”,“three”重命名为“1”,“2”和“3”,然后就可以了。

相关问题