gpt4 book ai didi

android - Android Studio中的Gradle构建出错

转载 作者:行者123 更新时间:2023-12-03 05:58:04 25 4
gpt4 key购买 nike

每次加载项目时,都会出现以下错误,并且我尝试了在互联网上找到的所有内容来解决这些错误,例如

  • 删除users文件夹中的.gradle文件,并让android重新构建。
  • 我尝试了重新验证缓存并重新启动它。
  • 卸载先前版本后,重新下载Android Studio。

  • 我尝试了许多帮助很多人的anwsers,但它仍然对我不起作用,基本上是我的全部依靠。昨天,我打开了一个 friend 项目,将其放在讲师的演示版上进行演示,但所做的一切却摧毁了我的Android Studio。有人可以帮忙吗?

    Error:(33, 13) Failed to resolve: com.android.support:support-vector-drawable:25.0.1 Install Repository and sync projectShow in File Show in Project Structure dialog

    Error:(24, 24) Failed to resolve: com.android.support.test.espresso:espresso-core:2.2.2 Install Repository and sync project Show in Project Structure dialog

    Error:(24, 24) Failed to resolve: com.android.support.test.espresso:espresso-core:2.2.2 Install Repository and sync project Show in Project Structure dialog


     apply plugin: 'com.android.application'

    android {
    compileSdkVersion 25
    buildToolsVersion "23.0.1"
    defaultConfig {
    applicationId "ie.wit.fitnessmadeeasy"
    minSdkVersion 19
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner
    "android.support.test.runner.AndroidJUnitRunner"
    vectorDrawables.useSupportLibrary = true
    }
    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:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile 'com.android.support:appcompat-v7:25.0.1'
    compile 'com.android.support:design:25.0.1'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.1'
    compile 'com.google.android.gms:play-services-maps:8.4.0'
    compile 'com.android.support:support-vector-drawable:25.0.1'
    testCompile 'junit:junit:4.12'
    }

    最佳答案

    您需要安装支持存储库,如here所述:

  • 启动Android SDK管理器。
  • 在“SDK管理器”窗口中,滚动到“软件包”列表的末尾,找到Extras文件夹,并在必要时展开以显示其内容。
  • 选择“Android支持存储库”项。
  • 单击安装软件包...按钮。
  • 关于android - Android Studio中的Gradle构建出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43636133/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com