码农后生

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

搭建Android studio环境遇到的问题

问题一

gradle-5.1.1-all.zip 下载失败

问题二

AS编译出现 ':app:preDebugAndroidTestBuild'的错误解决办法

androidTestCompile('com.android.support:support-annotations:26.1.0')
 {
   force = true
 }
  • 例如:
dependencies {
    androidTestCompile('com.android.support:support-annotations:26.1.0') {
        force = true
    }
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
posted on 2021-02-22 09:56  码农后生  阅读(179)  评论(0编辑  收藏  举报