kingdom578 / maven-android-plugin

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

Fix R generation for projects with apklib dependencies #373

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a large number of library projects with some IDs, etc
2. Create an application project which depends on these
3. Compile the application project

What is the expected output?
Application compiles.

What do you see instead?
Application does not compile. Dex exits with value 2, and prints the message 
"trouble writing output: Too many fields: 103357; max is 65536."

This is because the android-maven-plugin does not generate R files correctly.

It can be fixed by putting all library projects under the same package name; 
but this is not a good long-term solution.

What version of maven-android-plugin are you using?
2.5.3

What are the complete output lines of "mvn -version" on your machine?
C:\Users\Joseph\Workspace\mpowa\mpowa-app-android>mvn -version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 13:51:
28+0000)
Maven home: C:\Program Files (x86)\Apache\Maven\apache-maven-3.0.5\bin\..
Java version: 1.6.0_15, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_15\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

Please provide any additional information below.

Original issue reported on code.google.com by joseph.w...@gmail.com on 2 May 2013 at 12:32

GoogleCodeExporter commented 9 years ago
Seeing same issue here

Original comment by javi.pac...@gmail.com on 20 May 2013 at 12:50

GoogleCodeExporter commented 9 years ago
Try with 3.6.0 .. this should work .. 2.5.3 is WAY too old.

Original comment by mosa...@gmail.com on 24 May 2013 at 5:05

GoogleCodeExporter commented 9 years ago
I have the same problem in 3.6.0. When compiling a large project with many 
dependencies gets the message "Too many fields ..." My research shows that the 
generated R file is the same for all dependencies. When compiling in eclipse R 
file in the library has only a field for their dependencies, and not for the 
whole project. In intellij bug has been fixed 
(http://youtrack.jetbrains.com/issue/IDEA-107398) but not yet tested

Original comment by Juliusz....@gmail.com on 21 Jun 2013 at 11:04

GoogleCodeExporter commented 9 years ago
working with 3.6.1, getting same issue

Original comment by marchelo...@gmail.com on 3 Jan 2014 at 2:11

GoogleCodeExporter commented 9 years ago
huh, cannot reproduce it on 3.8.2 version.

Original comment by marchelo...@gmail.com on 3 Jan 2014 at 3:26

GoogleCodeExporter commented 9 years ago
seems that resolution of this issue has a side effect, described in Issue 441
http://code.google.com/p/maven-android-plugin/issues/detail?id=441

Original comment by marchelo...@gmail.com on 23 Jan 2014 at 2:08

GoogleCodeExporter commented 9 years ago
Test against 3.8.3-SNAPSHOT

If the failure stills occurs then provide a project or link to a project that 
clearly highlights the failure.

Original comment by william....@xandar.com.au on 17 Feb 2014 at 11:22

GoogleCodeExporter commented 9 years ago
Fixed (4.4.1 is fixed in 3.9.0)

Original comment by william....@xandar.com.au on 11 Mar 2014 at 12:44