问题描述
将项目升级到AndroidStudio 3.0-beta1后,我的 androidTest
文件停止编译.
After I upgrade my project to AndroidStudio 3.0-beta1, my androidTest
files stopped compiling.
找不到很多软件包,其中一些是:
A lot of packages are not found, some of them are:
我已经添加了
androidTestCompile "com.android.support:support-annotations:25.3.1"
放入 build.gradle
但是即使这样,我仍然没有找到错误的包.我尝试从Android Studio内部和具有 ./gradlew connectedCheck
But even with this, I have the errors of package not found. I tried running the tests from inside Android Studio and from terminal with ./gradlew connectedCheck
推荐答案
我遇到了同样的问题.问题不在于您升级了AndroidStudio,而是更新了SDK中的构建工具后,您的目标版本和编译版本低于26.
I had the same problem. The issue is not that you upgraded AndroidStudio but that your target version and compile version are below 26 after updating the build tools in your SDK.
如此改变
android {
compileSdkVersion 25
defaultConfig {
applicationId "bla.bla"
minSdkVersion 21
targetSdkVersion 25
}
}
到
android {
compileSdkVersion 26
defaultConfig {
applicationId "bla.bla"
minSdkVersion 21
targetSdkVersion 26
}
}
解决了问题.
这篇关于升级到Android Studio 3.0后,支持注释不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!