breautek commented on issue #1477:
URL: 
https://github.com/apache/cordova-android/issues/1477#issuecomment-1220662060

   > About the first point I do not have a file in ~/.gradle/gradle.properties
   
   Good, by default this file does not exists, but if it does, it will be used 
as user-level settings for gradle.
   
   > I tried to build with node 14.X, same issue. Unfortunately, i can't use 
Node 16.X cause of node-sass and ionic 3.X
   
   :+1: 14.x should be fine. Just one additional note, I'd use the latest patch 
available within 14.x. Which is I believe is currently `14.20.0`
   
   > And I need to create a local.properties with the sdk.dir variable in it 
([issue](https://stackoverflow.com/questions/67398608/unable-to-determine-android-sdk))
   
   This would be the Gradle way of defining where the Android SDK is. Cordova 
will read from the `ANDROID_HOME` and `ANDROID_SDK_HOME` environment variables 
and should set the required variables in the android studio project 
accordingly. But either way should work.
   
   I see that you're using ionic. To rule out that something inside inside 
ionic is causing the issue, I'd try building a test app without ionic.
   
   The following commands will create a pure "Hello Cordova" cordova project 
with cordova-android@11 and build/run it on a simulator or usb device.
   ```
   cordova create testapp
   cd testapp
   cordova platform add android@11
   cordova build android
   cordova run android
   ```
   
   You could also try the same thing with by simply adding ionic (however you 
do that, I'm not very familiar with ionic) to see if the issue reproduces with 
a simple ionic app.
   
   If the issue only reproduces with ionic, then it would suggest the issue is 
somewheres within the ionic codebase, which might be overwriting Cordova's 
configured gradle settings. If it does reproduce in the pure cordova hello 
world app, then we now have a simple app that shows something isn't configured 
correctly and we can work from there.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to