2016-06-17 95 views
1

我知道有很多類似的問題,但我確實嘗試了那裏描述的解決方案,但沒有成功。我已經重新安裝並更新了Android Studio,我已經清理了該項目,我已經同步並使緩存失效並重新啓動它。找不到android.support.design,... play-services,...支持,... appcompat

Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:assembleDebug] 
Error:A problem occurred configuring project ':app'. 
> Could not resolve all dependencies for configuration ':app:_debugCompile'. 
> Could not find com.android.support:appcompat-v7:23.4.0. 
Searched in the following locations: 
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/support/appcompat-v7/23.4.0/appcompat-v7-23.4.0.pom 
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/support/appcompat-v7/23.4.0/appcompat-v7-23.4.0.jar 
    https://jcenter.bintray.com/com/android/support/appcompat-v7/23.4.0/appcompat-v7-23.4.0.pom 
    https://jcenter.bintray.com/com/android/support/appcompat-v7/23.4.0/appcompat-v7-23.4.0.jar 
Required by: 
    MyApp:app:unspecified 
    > Could not find com.android.support:design:23.4.0. 
Searched in the following locations: 
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/support/design/23.4.0/design-23.4.0.pom 
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/support/design/23.4.0/design-23.4.0.jar 
    https://jcenter.bintray.com/com/android/support/design/23.4.0/design-23.4.0.pom 
    https://jcenter.bintray.com/com/android/support/design/23.4.0/design-23.4.0.jar 
Required by: 
    MyApp:app:unspecified 
    > Could not find com.google.android.gms:play-services:9.0.1. 
Searched in the following locations: 
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/google/android/gms/play-services/9.0.1/play-services-9.0.1.pom 
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/google/android/gms/play-services/9.0.1/play-services-9.0.1.jar 
    https://jcenter.bintray.com/com/google/android/gms/play-services/9.0.1/play-services-9.0.1.pom 
    https://jcenter.bintray.com/com/google/android/gms/play-services/9.0.1/play-services-9.0.1.jar 
Required by: 
    MyApp:app:unspecified 
    > Could not find com.android.support:support-v4:23.4.0. 
Searched in the following locations: 
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.pom 
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.jar 
    https://jcenter.bintray.com/com/android/support/support-v4/23.4.0/support-v4-23.4.0.pom 
    https://jcenter.bintray.com/com/android/support/support-v4/23.4.0/support-v4-23.4.0.jar 
Required by: 
    MyApp:app:unspecified 

我的搖籃的應用程序文件:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.3" 

    defaultConfig { 
     applicationId "myapp" 
     minSdkVersion 21 
     targetSdkVersion 23 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:23.4.0' 
    compile 'com.android.support:design:23.4.0' 
    compile 'com.loopj.android:android-async-http:1.4.9' 
    compile 'com.google.code.gson:gson:2.4' 
    compile 'com.google.android.gms:play-services:9.0.1' 
    compile 'com.android.support:support-v4:23.4.0' 
} 

這是非常令人沮喪,請告訴我該怎麼做建築項目(運行在其他電腦)時,我仍然得到這個錯誤。

回答

0

由於您已經嘗試了所有其他選項,因此我會建議刪除項目目錄並從存儲庫中執行另一個操作。這或你的文件在程序文件(x86)中,但這只是愚蠢的。

1

嘗試運行這個本地安裝所需要的庫:

android update sdk --no-ui --all --filter tool,extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository,android-23 
相關問題