首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到android.support.design,...播放服务,...support,...appcompat

找不到android.support.design,...播放服务,...support,...appcompat
EN

Stack Overflow用户
提问于 2016-06-17 16:05:25
回答 2查看 583关注 0票数 1

我知道有很多类似的问题,但我确实尝试了那里描述的解决方案,但没有成功。我已经重新安装和更新了Android Studio,我已经清理了项目,我已经同步和失效了缓存,并重新启动了它。在构建项目(在其他PC上运行)时,我仍然收到此错误:

代码语言:javascript
复制
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

我的Gradle应用程序文件:

代码语言:javascript
复制
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'
}

这太让人沮丧了,请告诉我该怎么做。

EN

回答 2

Stack Overflow用户

发布于 2016-07-15 22:17:39

尝试运行此命令以在本地安装所需的库:

代码语言:javascript
复制
android update sdk --no-ui --all --filter tool,extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository,android-23
票数 1
EN

Stack Overflow用户

发布于 2016-06-17 16:31:05

由于您已经尝试了所有其他选项,因此我建议删除项目目录并从您的存储库执行另一次提取。或者你的文件在程序文件(x86)中,但那是愚蠢的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37876266

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档