Reputation: 7873
I am trying to get my Ionic/Cordova Android build working on my Windows 11 machine.
I have installed everything I thought I needed to (Android Studio, Java, JSK) etc.
I have the following installed
C:\Users\myusername\AppData\Local\Android\Sdk\build-tools\33.0.3
And I have this set
I have gone into the cordova.gradle
where the error is being reported, and added a few more lines into the message, so I now have
if (highestBuildToolsVersion == null) {
throw new RuntimeException("""
No installed build tools found. Please install the Android build tools
version ${minBuildToolsVersionString}. minBuildToolsVersion" ${minBuildToolsVersionString}
maxVersion: ${minBuildToolsVersion.getMajor() + 1} buildbuildToolsDirContents ${buildToolsDirContents}
""".replaceAll(/\s+/, ' ').trim())
}
I get the following printed out....
No installed build tools found. Please install the Android build tools version 30.0.3. minBuildToolsVersion" 30.0.3 maxVersion: 31 buildbuildToolsDirContents [33.0.0, 33.0.3]
So is IS finding the 33.0.3
as one of the folders, but I don't underdstand this following line which is returning null....
def highestBuildToolsVersion = buildToolsDirContents
.collect { new Version(it) }
// Invalid inputs will be handled as 0.0.0
.findAll { it.isHigherThan('0.0.0') && it.isLowerThan(maxVersion) }
.max()
Anyone have any idea what the above line is (I Have no idea what language this is), and why it is returning null?
Upvotes: 0
Views: 20