yuchen931201 / maven-android-plugin

Automatically exported from code.google.com/p/maven-android-plugin
0 stars 0 forks source link

Can't find aapt #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build a maven project.
2.
3.

What is the expected output? What do you see instead?
When aapt is executed maven says:

[INFO] null/tools/aapt [package, -m, -J, 
C:\java\appstore\trunk\client\android\app\target\generated-sources\r, -M, 
C:\java\appstore\trunk\client\android\app\AndroidManifest.xml, -S, 
C:\java\appstore\trunk\client\android\app\res, -I, c:\Documents and 
Settings\Albin\.m2\repository\android\android\1.1_r1\android-1.1_r1.jar]

I have the ANDROID_HOME variable set correctly, but the plugin apparently 
ignores it.

What version of maven-android-plugin are you using?
2.0.0-alpha1

What is the output of "mvn -version" on your machine?
Maven version: 2.0.9
Java version: 1.6.0_11
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

Please provide any additional information below.

Original issue reported on code.google.com by albin.th...@gmail.com on 9 Jun 2009 at 9:37

GoogleCodeExporter commented 9 years ago

Original comment by hugo.josefson.old@gmail.com on 9 Jun 2009 at 9:56

GoogleCodeExporter commented 9 years ago
I'll have a look-see...

Original comment by hugo.josefson.old@gmail.com on 10 Jun 2009 at 7:53

GoogleCodeExporter commented 9 years ago
(did this yesterday, but apparently lost network connection after submitting so 
sorry
for posting late.)

Found it! Maven-Android-Plugin currently looks for ANDROID_SDK, not 
ANDROID_HOME. Try
setting that instead.

It is documented in the README.txt, but I understand why it's easy to miss. It 
took
me a while to realize myself!

I was talking to Mattias earlier tonight about how the plugin should find the 
SDK. I
*could* add lots of magic which would look for several environment variables, 
and
even fall back to backtrace the directory via any android tool found on PATH... 
On
the other hand, keeping it simple has its own benefits; everyone knows there is 
only
one way to configure it and it has to be done...

For example: requiring that the <plugin> tag for maven-android-plugin in the 
pom is
configured with an <androidSdkLocation> tag. The sample configuration which 
users cut
and paste from, could then suggest using
<androidSdkLocation>${env.ANDROID_SDK}</androidSdkLocation>. I think that would 
be
both easy to use, easy to understand and easy to reconfigure.

What do you think?

And what does everyone else reading this issue think?

Original comment by hugo.josefson.old@gmail.com on 11 Jun 2009 at 12:37

GoogleCodeExporter commented 9 years ago
Cross-posting to Maven Android Developers so we can continue the discussion out 
in
the open, where more people can see it and chime in.

Please don't respond to my question inside this Issue :) but instead click here 
-->>
http://groups.google.com/group/maven-android-developers/browse_thread/thread/2c7
4470e5a33ec79

Thanks!

/Hugo

Original comment by hugo.josefson.old@gmail.com on 11 Jun 2009 at 12:52

GoogleCodeExporter commented 9 years ago

Original comment by hugo.josefson.old@gmail.com on 21 Jun 2009 at 11:21