更新到
Android Strudio 3.0后,我尝试添加一个库
project structure -> dependencies -> add library
,但搜索似乎不起作用,没有找到任何东西.
我的build.gradle文件看起来像这样
buildscript { repositories { jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() google() } } task clean(type: Delete) { delete rootProject.buildDir }
和gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
解决方法
似乎只能搜索com.android.xx和com.google.xx包中的库.