-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ANDROID_HOME is deprecated #949
Comments
cordova-android does support |
I am unable to build on android platform if ANDROID_SDK_ROOT is set but ANDROID_HOME is NOT set.
|
I've actually reproduced this as well... the tooling prints out that |
This commit does the following: - Makes ANDROID_SDK_ROOT the primary variable to look for the Android SDK location. - Makes ANDROID_HOME the fallback variable, if ANDROID_SDK_ROOT is not present/valid. Gradle updates: Note that the following gradle updates were required, otherwise the android gradle plugin did not honour the ANDROID_SDK_ROOT variable. - Updates the framework's android studio's gradle plugin from version 3.3.0 to 3.5.3. Not only this is required for android's gradle to obey ANDROID_SDK_ROOT, it is now in sync with the Android test project/ - Updates the Androidx test project to use gralde plugin from version 3.3.0 to 3.5.3, to match Android Test & framework. - Consequentially, this required to also upgrade AndroidX test project to use Gradle 6.1, which also matches both the Android test project & framework These changes above fixes apache#949 Additionally, since we update the environment variables dynamically, the environment variable printout produced misleading information. The environment variable printout will now print out the variable as defined by the user (before the tooling messes with them). An additional log is printed that tells the user exactly what Cordova is going to use for the Android SDK path. This should fix apache#670
This commit does the following: - Makes ANDROID_SDK_ROOT the primary variable to look for the Android SDK location. - Makes ANDROID_HOME the fallback variable, if ANDROID_SDK_ROOT is not present/valid. Gradle updates: Note that the following gradle updates were required, otherwise the android gradle plugin did not honour the ANDROID_SDK_ROOT variable. - Updates the framework's android studio's gradle plugin from version 3.3.0 to 3.5.3. Not only this is required for android's gradle to obey ANDROID_SDK_ROOT, it is now in sync with the Android test project/ - Updates the Androidx test project to use gralde plugin from version 3.3.0 to 3.5.3, to match Android Test & framework. - Consequentially, this required to also upgrade AndroidX test project to use Gradle 6.1, which also matches both the Android test project & framework These changes above fixes apache#949 Additionally, since we update the environment variables dynamically, the environment variable printout produced misleading information. The environment variable printout will now print out the variable as defined by the user (before the tooling messes with them). An additional log is printed that tells the user exactly what Cordova is going to use for the Android SDK path. This should fix apache#670
This commit does the following: - Makes ANDROID_SDK_ROOT the primary variable to look for the Android SDK location. - Makes ANDROID_HOME the fallback variable, if ANDROID_SDK_ROOT is not present/valid. Gradle updates: Note that the following gradle updates were required, otherwise the android gradle plugin did not honour the ANDROID_SDK_ROOT variable. - Updates the framework's android studio's gradle plugin from version 3.3.0 to 3.5.3. Not only this is required for android's gradle to obey ANDROID_SDK_ROOT, it is now in sync with the Android test project/ - Updates the Androidx test project to use gralde plugin from version 3.3.0 to 3.5.3, to match Android Test & framework. - Consequentially, this required to also upgrade AndroidX test project to use Gradle 6.1, which also matches both the Android test project & framework These changes above fixes apache#949 Additionally, since we update the environment variables dynamically, the environment variable printout produced misleading information. The environment variable printout will now print out the variable as defined by the user (before the tooling messes with them). An additional log is printed that tells the user exactly what Cordova is going to use for the Android SDK path. This should fix apache#670
This commit does the following: - Makes ANDROID_SDK_ROOT the primary variable to look for the Android SDK location. - Makes ANDROID_HOME the fallback variable, if ANDROID_SDK_ROOT is not present/valid. Gradle updates: Note that the following gradle updates were required, otherwise the android gradle plugin did not honour the ANDROID_SDK_ROOT variable. - Updates the framework's android studio's gradle plugin from version 3.3.0 to 3.5.3. Not only this is required for android's gradle to obey ANDROID_SDK_ROOT, it is now in sync with the Android test project/ - Updates the Androidx test project to use gralde plugin from version 3.3.0 to 3.5.3, to match Android Test & framework. - Consequentially, this required to also upgrade AndroidX test project to use Gradle 6.1, which also matches both the Android test project & framework These changes above fixes apache#949 Additionally, since we update the environment variables dynamically, the environment variable printout produced misleading information. The environment variable printout will now print out the variable as defined by the user (before the tooling messes with them). An additional log is printed that tells the user exactly what Cordova is going to use for the Android SDK path. This should fix apache#670
This commit does the following: - Makes ANDROID_SDK_ROOT the primary variable to look for the Android SDK location. - Makes ANDROID_HOME the fallback variable, if ANDROID_SDK_ROOT is not present/valid. Gradle updates: Note that the following gradle updates were required, otherwise the android gradle plugin did not honour the ANDROID_SDK_ROOT variable. - Updates the framework's android studio's gradle plugin from version 3.3.0 to 3.5.3. Not only this is required for android's gradle to obey ANDROID_SDK_ROOT, it is now in sync with the Android test project/ - Updates the Androidx test project to use gralde plugin from version 3.3.0 to 3.5.3, to match Android Test & framework. - Consequentially, this required to also upgrade AndroidX test project to use Gradle 6.1, which also matches both the Android test project & framework These changes above fixes apache#949 Additionally, since we update the environment variables dynamically, the environment variable printout produced misleading information. The environment variable printout will now print out the variable as defined by the user (before the tooling messes with them). An additional log is printed that tells the user exactly what Cordova is going to use for the Android SDK path. This should fix apache#670
This commit does the following: - Makes ANDROID_SDK_ROOT the primary variable to look for the Android SDK location. - Makes ANDROID_HOME the fallback variable, if ANDROID_SDK_ROOT is not present/valid. Gradle updates: Note that the following gradle updates were required, otherwise the android gradle plugin did not honour the ANDROID_SDK_ROOT variable. - Updates the framework's android studio's gradle plugin from version 3.3.0 to 3.5.3. Not only this is required for android's gradle to obey ANDROID_SDK_ROOT, it is now in sync with the Android test project/ - Updates the Androidx test project to use gralde plugin from version 3.3.0 to 3.5.3, to match Android Test & framework. - Consequentially, this required to also upgrade AndroidX test project to use Gradle 6.1, which also matches both the Android test project & framework These changes above fixes #949 Additionally, since we update the environment variables dynamically, the environment variable printout produced misleading information. The environment variable printout will now print out the variable as defined by the user (before the tooling messes with them). An additional log is printed that tells the user exactly what Cordova is going to use for the Android SDK path. This should fix #670
As of April 27, 2022, the page at https://developer.android.com/studio/command-line/variables says:
So Cordova is saying the opposite of what the Android team is saying. |
For context, Google can't seem to make up their mind. e.g: back in 2018 https://web.archive.org/web/20181121202227/https://developer.android.com/studio/command-line/variables
|
Retained old SDKs and Build Tools
Feature Request
Motivation Behind Feature
Keep environment clean
Feature Description
ANDROID_HOME is deprecated and replaced with ANDROID_SDK_ROOT by android SDK.
It would be nice, if cordova also support ANDROID_SDK_ROOT variable to make it consistent with the SDK.
The text was updated successfully, but these errors were encountered: