cordova-android
cordova-android copied to clipboard
fix: ANDROID_HOME is the new default, to check first and give advice
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
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.
Final call for review before merging.
Thank you @ath0mas for helping us keep up with Android tooling standards.