无法在Android Studio中构建项目

时间:2014-11-11 06:44:26

标签: android android-studio

我从Eclipse将项目导入Android Studio。它在Eclipse中成功构建。 在导入过程结束时,我收到了这个错误:

Gradle project sync failed. Basic functionality will not work

在Gradle控制台中,我收到以下错误:

Error:Failed to find: com.android.support:appcompat-v7:20.+

我已经安装了google支持存储库,如其他地方所述。

这是我的build.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 20
buildToolsVersion "21.0.0"

defaultConfig {
    applicationId "com.entujn.demo"
    minSdkVersion 10
    targetSdkVersion 19
}

buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-   rules.txt'
        }
    }
}

dependencies {
    compile 'com.google.android.gms:play-services:+'
    compile 'com.android.support:appcompat-v7:20.+'
    compile files('libs/commons-lang3-3.3.2.jar')
}

local.properties:

sdk.dir=/home/pankaj/adt-bundle-linux-x86_64-20140702/sdk

SDK目录结构screenshot

看起来appcompat的东西不在正确的位置,我该如何解决?

1 个答案:

答案 0 :(得分:0)

看起来Android Studio使用另一个SDK副本,但没有安装Android支持存储库。请确保已安装所有必需的组件。

相关问题