cordova android 13 build error
ByDodo opened this issue · 5 comments
Hi, I did a clean install but I am getting the error below.
cordova build -d
result:
Command failed with exit code 1: c:\inetpub\www\testapp\node_modules\cordova-android\lib\getASPath.bat
Error: Command failed with exit code 1: c:\inetpub\www\testapp\node_modules\cordova-android\lib\getASPath.bat
at makeError (c:\inetpub\www\testapp\node_modules\execa\lib\error.js:60:11)
at module.exports.sync (c:\inetpub\www\testapp\node_modules\execa\index.js:194:17)
at module.exports.get_gradle_wrapper (c:\inetpub\www\testapp\node_modules\cordova-android\lib\check_reqs.js:113:30)
at module.exports.check_gradle (c:\inetpub\www\testapp\node_modules\cordova-android\lib\check_reqs.js:155:39)
at ProjectBuilder.prepEnv (c:\inetpub\www\testapp\node_modules\cordova-android\lib\builders\ProjectBuilder.js:288:27)
at module.exports.run (c:\inetpub\www\testapp\node_modules\cordova-android\lib\build.js:177:20)
at c:\inetpub\www\testapp\node_modules\cordova-android\lib\Api.js:247:43
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
cordova version 12.0.0 (cordova-lib@12.0.1)
npm version 10.8.2
Android Studio Koala | 2024.1.1 Patch 1
gradle
Gradle 8.9
Build time: 2024-07-11 14:37:41 UTC
Revision: d536ef36a19186ccc596d8817123e5445f30fef8
Kotlin: 1.9.23
Groovy: 3.0.21
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
Launcher JVM: 17.0.12 (Oracle Corporation 17.0.12+8-LTS-286)
Daemon JVM: C:\Program Files\Java\jdk-17 (no JDK specified, using current Java home)
OS: Windows 10 10.0 amd64
cordova version 12.0.0
This version doesn't support gradle 8.
Cordova android 13 is the first version that supports Gradle 8 and is what is required to target SDK 34 so I'd recommend updating.
See https://cordova.apache.org/announcements/2024/05/23/cordova-android-13.0.0.html for update notes.
Closing this issue because we aren't addressing any issues for cordova-android@12. If you encounter a bug in 13 please open a new issue with the relevant details.
When i got back on the computer and reread the email I realised I misread. I'll reopen this so that it can be triaged appropriately.
The getASPath batch script is pretty simple, it seems to be looking for HKEY_LOCAL_MACHINE\SOFTWARE\Android Studio
registry key. Does android studio installations not set that registry key anymore?
Solution: Antivirus is blocking the getASPath.bat file. Sorry for the inconvenience :)
Solution: Antivirus is blocking the getASPath.bat file. Sorry for the inconvenience :)
Ok sounds good. It sounds like there is nothing actionable by Cordova in this case so I'll close this issue.