android - 我无法使用android studio建立第一个空项目

标签 android android-studio gradle compilation

最近我已经安装了android studio,但是我无法建立一个空项目!哪里有问题?!!
在下面找到同步问题详细信息

Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.android.support.test:runner:1.0.1.

Could not resolve com.android.support.test:runner:1.0.1.
Required by:
    project :app
 > Could not resolve com.android.support.test:runner:1.0.1.
    > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/support/test/runner/1.0.1/runner-1.0.1.pom'.
          > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/support/test/runner/1.0.1/runner-1.0.1.pom'.
                   > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
                               > PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
                                              > unable to find valid certification path to requested target

最佳答案

您可以尝试删除依赖项内gradle.build(app)中的所有测试文件,看起来像这样

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

该问题可能是由于您的互联网连接导致无法下载文件。

关于android - 我无法使用android studio建立第一个空项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47372776/

相关文章:

java - 编译时在 gradle 中收到 support-v7 :25. 1.0 错误

java - asyncTask 的 doInBackground 没有被调用?

android - 读取 Sqlite 数据库时出错 : Database google_app_measurement_local. db not found

android - 使用 firebase 和 google play service api 时 Ionic 应用程序崩溃

gradle - Gradle Task使用 “<<”有什么区别吗?

java - 如何从 firebase 检索键和值并将它们存储在两个单独的变量中

android - OkHttp/Retrofit 默认超时

android - Android API 级别从 18 更改为 17,但 android 从来没有 "Boots Up"

android-studio - Android Studio 找不到我的 Google Play 服务

安卓工作室AVD : Segmentation Fault when starting AVD