android studio java lib不能直接运行

报 类无法找到

1.修改 gradle: 

distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

2.google()仓库去掉

3. dependencies 下都改成:

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.3.1'
testCompile 'junit:junit:4.12'

}
4.工程修改版本
classpath 'com.android.tools.build:gradle:2.2.2'

5.
    buildToolsVersion "25.0.2"





posted on 2018-01-10 14:02  yaolunhui  阅读(898)  评论(0编辑  收藏  举报

导航