cordova-android icon indicating copy to clipboard operation
cordova-android copied to clipboard

fix: ANDROID_HOME is the new default, to check first and give advice

Open ath0mas opened this issue 3 years ago • 1 comments

Platforms affected

Android

Motivation and Context

cordova-android 11.0.0 (since #1444) reports about Android SDK: undefined while ANDROID_HOME is set and ANDROID_SDK_ROOT is not.

Description

cordova create hello com.example.hello HelloWorld
cd hello/
cordova platform add [email protected]
cordova build

with environment variables set for Java (JAVA_HOME) and Android (ANDROID_HOME, and no more ANDROID_SDK_ROOT)

results in a successful build but with wrong reporting during the first steps:

Checking Java JDK and Android SDK versions
ANDROID_HOME=C:\my\path\to\android-sdk (recommended setting)
ANDROID_SDK_ROOT=undefined (DEPRECATED)
Using Android SDK: undefined

Testing

  • creating and building a blank project using local clone of my fork of cordova-android
  • npm run test

Checklist

  • [x] I've run the tests to see all new and existing tests pass
  • [x] I added automated test coverage as appropriate for this change
  • [x] Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • [x] I've updated the documentation if necessary

ath0mas avatar Jul 31 '22 22:07 ath0mas

Codecov Report

Merging #1471 (b06f3db) into master (60e3803) will not change coverage. The diff coverage is 50.00%.

@@           Coverage Diff           @@
##           master    #1471   +/-   ##
=======================================
  Coverage   72.25%   72.25%           
=======================================
  Files          21       21           
  Lines        1748     1748           
=======================================
  Hits         1263     1263           
  Misses        485      485           
Impacted Files Coverage Δ
lib/check_reqs.js 71.05% <50.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

codecov-commenter avatar Jul 31 '22 22:07 codecov-commenter

Final call for review before merging.

breautek avatar Apr 08 '23 18:04 breautek

Thank you @ath0mas for helping us keep up with Android tooling standards.

breautek avatar Apr 09 '23 23:04 breautek