Skip to content

friendly CPLnchErrs msgs from zipalign,jarsigner,aapt#4

Open
beplaya wants to merge 1 commit into
leandog:masterfrom
beplaya:friendlypatherrs
Open

friendly CPLnchErrs msgs from zipalign,jarsigner,aapt#4
beplaya wants to merge 1 commit into
leandog:masterfrom
beplaya:friendlypatherrs

Conversation

@beplaya

@beplaya beplaya commented Nov 11, 2013

Copy link
Copy Markdown

A solution is not readily apparent when errors occur with “Unknown error (Windows says "The operation completed successfully.", but it did not.) (ChildProcess::LaunchError)”. This is typically resulted from simply not having the correct path variable setup.
This change outputs friendly error messages that suggest zipalign, jarsigner, and / or aapt are not in the user’s path when a ChildProcess::LaunchError occurs:
ERROR: Could not load manifest with aapt. Perhaps aapt is not in your path?
ERROR: Could not execute jarsigner command. Perhaps jarsigner is not in your path?
ERROR: Could not execute zipalign command. Perhaps zipalign is not in your path?

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling 4f2a918 on beplaya:friendlypatherrs into 24f5cb3 on leandog:master.

@leviwilson

Copy link
Copy Markdown
Contributor

Thanks for your submission.

#3 is a related issue. I'm wondering if a better overall check for all of the tools that brazenhead depends on would be more appropriate? Specifically, checking for the following items:

This might be a more specific approach to addressing the environment setup than the proposed solution. Thoughts?

@beplaya

beplaya commented Nov 11, 2013

Copy link
Copy Markdown
Author

I agree, BUT the only problem with an overall check is that it may [be] hard to avoid relying on the Android SDK directory structure (which already changed once). I suppose simply being "smarter about looking for tools" would solve that (whatever that means). However, the proposed solution was done with a last line of defense mentality; If it blows up around here, it "perhaps" is [common reason] so people aren't left with parsing the stack trace and source code to deduce things.

It's a matter of opinion. I'm just tired of remembering too many things every time I set it up on a new machine. Maybe updating the doc is the real solution, and if there are any error messages, they should just point to the doc? ~gjames

@leviwilson

Copy link
Copy Markdown
Contributor

"Be smarter" about looking for the tools means looking beneath ANDROID_HOME and do a Dir.glob to find exactly what I'm looking for, rather than relying on the system to find aapt, etc. I'm absolutely with you about fixing this so others do not have to remember this. Verifying environment variables would get us most of the way there though, correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants