MobileChromeApps / mobile-chrome-apps

Chrome apps on Android and iOS
BSD 3-Clause "New" or "Revised" License
2.5k stars 347 forks source link

cca checkenv misses some detectable issues #514

Open drewp opened 9 years ago

drewp commented 9 years ago

Here are two failures I experienced after checkenv said "SDK configured properly". It might be a little less soul-crushing if checkenv listed these problems and solutions instead of letting me walk into them on subsequent steps.

android-sdk-linux/platform-tools/adb: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory (fixed by installing some 32-bit packages)

ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-6-openjdk-common (I don't even know- I want to make chrome apps)

drewp commented 9 years ago

Then, Execution failed for task ':CordovaLib:compileDebugJava'.

Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory.

agrieve commented 9 years ago

Yikes! Hope your soul managed to recover from this one!

Interesting that vanilla cordova works fine, because the errors you report are actually due to code in Cordova.

Would be awesome if you could try and debug this for us with your configuration. Here's where the JAVA_HOME logic is:

https://github.com/apache/cordova-android/blob/master/bin/lib/check_reqs.js#L105

For adb, maybe what we can do is just to a test execute of the command in checkenv to see if it runs okay.

agrieve commented 9 years ago

Also - they copy of cordova-android that cca uses is bundled with the tool, so assuming you npm installed cca, you'll find it here:

$(dirname $(which cca))/../lib/node_modules/cca/cordova/cordova-android/