[英]Where is Android Studio reading the build tools version?
I'm getting the error: 我收到错误消息:
WARN - ect.sync.idea.ProjectSetUpTask - Failed to find Build Tools revision 26.0.2 警告-ect.sync.idea.ProjectSetUpTask-无法找到构建工具修订版26.0.2
It is actually an error breaking my build but this wasn't copyable so I found this line in the log (the only place I could find reference to "26.0.2" 这实际上是一个错误,破坏了我的版本,但这是不可复制的,因此我在日志中找到了这一行(我唯一可以找到对“ 26.0.2”的引用)
I've searched (Ctrl-Shift-F) for 26.0.2 everywhere and found just 2 occurrences of 26 in one file, the "app" level build.gradle: 我到处搜索(Ctrl-Shift-F)26.0.2,发现在一个文件“ app”级别build.gradle中只有2次出现26。
android { compileSdkVersion 26 defaultConfig { targetSdkVersion 26 ...
Which I changed to 27, my build tools is 27.0.3 which I use for other projects, I don't want another build tools. 其中我变为27,我的构建工具是27.0.3,我用其他项目,我不希望再构建工具。 How can I communicate this to Android Studio? 如何将其传达给Android Studio?
Credit to https://stackoverflow.com/a/47425748/866333 , I hope this offers easier sign posting: 归功于https://stackoverflow.com/a/47425748/866333 ,我希望这可以简化招牌发布:
android {
compileSdkVersion 27
// Add the following line, Android Studio is quite good for filtering bloat.
buildToolsVersion "27.0.3"
defaultConfig {
targetSdkVersion 27
...
I actually had to add a line, so I don't know where AS was reading 26.0.2 from, but this fix has worked on 2 of my projects. 我实际上必须添加一行,所以我不知道AS从哪里读取26.0.2,但是此修复程序已经在我的2个项目中起作用。 Oh, and because I'm now using the support lib (because its 2018): 哦,因为我现在正在使用支持库(因为其2018年):
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:design:26.1.0'
will be on the wrong versions, fix by replacing the 3 occurrences of "26.1.0" with, eg, "27.1.1", as that was what the error messages was hinting at. 会使用错误的版本,请通过用“ 27.1.1”替换3个出现的“ 26.1.0”来解决,因为这就是错误消息所暗示的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.