You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "oli06 (via GitHub)" <gi...@apache.org> on 2025/09/03 09:02:38 UTC
[I] Android project can't be opened in Android Studio due to wrongly set path in config.properties after `cordova build android` in `cordova-android@14.0.1` [cordova-android]
oli06 opened a new issue, #1842:
URL: https://github.com/apache/cordova-android/issues/1842
# Bug Report
## Problem
### What is expected to happen?
After a successful `cordova build android`, it should be possible to open the app in Android Studio.
### What does actually happen?
Android Studio can't open the project (`platforms/android`) and fails with a `Malformed \uxxxx encoding.` exception. This exception comes from a wrongly set path inside the `config.properties` in `tools/.gradle` (and is then copied to `.gradle` which is set by a cordova hook during (or after) the build command. The file contains the following content which is copied from the system `JAVA_HOME` variable:
```
java.home=C:\Users\user\.jdks\corretto-17.0.12
```
Instead, the `\` should be escaped: `java.home=C:\\Users\\user\\.jdks\\corretto-17.0.12`.
This issue was introduced in `cordova-android@14.0.1` with the [fix: configure gradle java.home](https://github.com/apache/cordova-android/pull/1795) and is probably a problem only on windows machines.
### Environment, Platform, Device
cordova-android@14.0.1
Windows 11
### Version information
Android Studio Narwhal Feature Drop | 2025.1.2 Patch 2
Build #AI-251.26094.121.2512.13991807, built on August 26, 2025
Runtime version: 21.0.6+-13391695-b895.109 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 11.0
Kotlin plugin: K2 mode
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4096M
Cores: 32
Registry:
ide.experimental.ui=true
Non-Bundled Plugins:
com.github.copilot (1.5.53-243)
## Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Android project can't be opened in Android Studio due to wrongly set path in config.properties after `cordova build android` in `cordova-android@14.0.1` [cordova-android]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #1842:
URL: https://github.com/apache/cordova-android/issues/1842#issuecomment-3662988765
Confirmed on 14.0.1 and the issue is still present on `@nightly` as well. #1876 should resolve the issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Android project can't be opened in Android Studio due to wrongly set path in config.properties after `cordova build android` in `cordova-android@14.0.1` [cordova-android]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek closed issue #1842: Android project can't be opened in Android Studio due to wrongly set path in config.properties after `cordova build android` in `cordova-android@14.0.1`
URL: https://github.com/apache/cordova-android/issues/1842
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org