kingdom578 / maven-android-plugin

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

Apk project import ApkLib(s) cause generated R.* values duplicate between Apk and ApkLib projects #442

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use latest plugin 3.8.2, Android SDK 19.0.1
2. Create an ApkLib project with layout and res
3. Import that ApkLib project within an Apk project
4. mvn package

What is the expected output?
If there is a layout activity_layout_from_lib from lib project, and this 
activity is called from apk project, the inflator inflate 
activity_layout_from_lib, but actually the result is activity_layout_from_apk; 
because both of com.apklib.R and com.apk.R generate the same 
R.layout.activity_layout_from_lib and R.layout.activity_layout_from_apk with 
the same value, for example 0x7f030000
It supposes to merge all values from R files and have a final R file without 
duplicate ids 

What do you see instead?
There are multiple R file in difference folder of /target/generated-sources/r
Each R files could have the same ids set, which lead to error when app is 
running

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

What are the complete output lines of "mvn -version" on your machine?
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 
22:22:22+0700)
Maven home: D:\DevTools\apache-maven-3.1.1
Java version: 1.7.0_25, vendor: Oracle Corporation
Java home: D:\DevTools\jdk1.7.0_25\jre
Default locale: en_US, platform encoding: Cp1258
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 len...@gmail.com on 19 Jan 2014 at 5:22

GoogleCodeExporter commented 9 years ago
I used artifacts from maven-android-sdk-deployer 

Original comment by len...@gmail.com on 19 Jan 2014 at 5:25

GoogleCodeExporter commented 9 years ago
I think that expected output in this case should be next:
com.apklib.R should have ids of a resources only from apklib subproject 
and com.apk.R - resources only from apk project

Original comment by marchelo...@gmail.com on 21 Jan 2014 at 10:19

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:07

GoogleCodeExporter commented 9 years ago
it is normal when after merging resources - resource from Apk overlays resource 
from Apklib with similar name, and it is correct that R file in Apklib contains 
link to overlayed resource (we will get compilation error instead)

so, as for me it is not a bug (at least not a bug of maven-android-plugin)

Original comment by olegalex...@gmail.com on 17 Feb 2014 at 1:14

GoogleCodeExporter commented 9 years ago
After get the snapshot build that fix issue-441, this issue also resolved. I 
guess they are similar problems. Please close this one if the rev include fix 
issue-441 is included in next release. 

Original comment by len...@gmail.com on 24 Feb 2014 at 5:13

GoogleCodeExporter commented 9 years ago

Original comment by william....@xandar.com.au on 24 Feb 2014 at 5:34