Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android studio Gradle项目同步已完成,但出现错误_Android_Android Gradle Plugin - Fatal编程技术网

Android studio Gradle项目同步已完成,但出现错误

Android studio Gradle项目同步已完成,但出现错误,android,android-gradle-plugin,Android,Android Gradle Plugin,我最近开始学习android studio,并在LinuxMint18上安装android studio,但遇到了这个问题。我的build.gradle文件包含以下代码 apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { applicationId "com.example.and

我最近开始学习android studio,并在LinuxMint18上安装android studio,但遇到了这个问题。我的build.gradle文件包含以下代码

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.example.android.justjava"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:25.+'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.0', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'junit:junit:4.12'
}

只需替换您的
编译'com.android.support:appcompat-v7:25.+'

使用最新的依赖项,如
compile'com.android.support:appcompat-v7:25.3.1'
Gradle项目同步已完成,但有错误
您希望有人帮助您修复他不知道的错误吗?!请提供错误并解释此问题的含义!使用gradlew assemble--info获取更多细节这是一个很好的提示,因为使用+通配符从来都不是一个好主意,但它与问题无关。