简体   繁体   English

首次安装Android Studio

[英]Android Studio Setup For First time

I am trying to run a Simple Hello World Application in Android Studio But Gradle could not solve the dependencies. 我试图在Android Studio中运行一个简单的Hello World应用程序但是Gradle无法解决依赖关系。

> Could not resolve all dependencies for configuration':app:_debugAndroidTestApkCopy'.> Could not resolve com.squareup:javawriter:2.1.1.
 Required by:
     MyApplication:app:unspecified > com.android.support.test.espresso:espresso-core:2.2.2
  > Could not resolve com.squareup:javawriter:2.1.1.
     > Could not get resource 'https://jcenter.bintray.com/com/squareup/javawriter/2.1.1/javawriter-2.1.1.pom'.

Similar More errors came up in the Error stack 类似的更多错误出现在错误堆栈中

You need to add below dependancies in app module build.gradle; 您需要在app module build.gradle中添加以下依赖项;

dependencies {
compile 'com.squareup:javawriter:2.5.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'} 

and use ; 并使用;

repositories {
    mavenCentral()
}

instead of jcenter() in project level build.gradle, this will resolve the gradle dependancies. 而不是项目级build.gradle中的jcenter(),这将解决gradle依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM