Error:Cause: buildToolsVersion is not specified

前端 未结 12 2306
慢半拍i
慢半拍i 2020-12-24 00:50

I create a simple project and then I right-click on the project and then I use the make mudole app option. Now I have two build.gradle folders: 1-

12条回答
  •  南笙
    南笙 (楼主)
    2020-12-24 01:04

    Might be helpful for someone: in my case long time ago I had added keystore properties in build.gradle file for Android:

    def keystorePropertiesFile = rootProject.file("keystore.properties")
    def keystoreProperties = new Properties()
    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
    

    and after some period of time I pulled repo and forgot to add this file ("keystore.properties").

    Gradle for some reason (!) gave me the same error (buildToolsVersion was defined a bit below in build.gradle file). The workaround was just to add missing "keystore.properties" file.

提交回复
热议问题