Closed GoogleCodeExporter closed 9 years ago
I can confirm this problem with apklib.
I mentioned it in the wrong ticket (437)
Original comment by benoit.b...@gmail.com
on 19 Jan 2014 at 10:36
I am also having this problem. I couldn't upgrade to 3.8.2
Original comment by maca...@gmail.com
on 20 Jan 2014 at 9:28
It's very actual for me. I have same problem. Can you help us?
Original comment by Shumyl...@gmail.com
on 24 Jan 2014 at 10:05
Working on a big project with a complex structure that consist of multiple
apklibs. Having problem with amount of fields over 65536 because of problem in
3.8.1 version.
So I need to use 3.8.2 version, but I met current issue and can't use maven at
all for project build.
Original comment by ann.isil...@gmail.com
on 25 Jan 2014 at 2:06
I compared this to output from a 3.6.0 build where both R$id.smali matched.
Using the original posters example, the com.example.application.R has the
correct values and com.example.library.R has the incorrect values.
Original comment by mala...@playhaven.com
on 5 Feb 2014 at 4:23
Point me to a project/branch exhibiting this behaviour?
Original comment by william....@xandar.com.au
on 10 Feb 2014 at 10:32
Scratch that, I see you've attached a project.
Original comment by william....@xandar.com.au
on 10 Feb 2014 at 11:22
[deleted comment]
I just tested it against the current master 3.8.3-SNAPSHOT of this day and it
still does not work but that's expected as nothing was done in order to fix it
;)
Original comment by benoit.b...@gmail.com
on 11 Feb 2014 at 10:58
OK, after fixing the errors in this project up I can't find any meaningful
differences between the output for 3.8.1, 3.8.2 and 3.8.3-SNAPSHOT.
I've attached my modified project.
I don't see any problem here at all.
The core problem is that the parent project declares a plugin management config
for android-maven-plugin (which is ok), but then declares a a plugin config for
maven-android-plugin which is the old plugin.
This was obvious from the build output because there are warnings for not
version info for maven-android-plugin, so it defaulted to the last version
which was 3.0.0-alpha
The other thing obfuscating the output was that one of the images had been set
as a background as well as one of the foreground images. So it was nigh well
impossible to tell whether anything was wrong.
Please try and create simple projects that readily highlight the issue.
Manfred, this issue should be closed as not an issue.
Original comment by william....@xandar.com.au
on 17 Feb 2014 at 11:02
Attachments:
[deleted comment]
I should have mentioned than when I fixed up the pom I was able to reproduce
the problem.
But I agree this sample project wasn't properly set.
Original comment by benoit.b...@gmail.com
on 17 Feb 2014 at 11:42
One thing that's not normal for me is if you look at
maven-android-plugin-issue-441\application\target\generated-sources\r\com\exampl
e\library\R.java
You have:
public static int idea=0x7f020000;
public static int lib_launcher=0x7f020001;
& in the other R file
maven-android-plugin-issue-441\application\target\generated-sources\r\com\exampl
e\application\R.java
You have:
public static final int idea=0x7f020001;
public static final int lib_launcher=0x7f020002;
Original comment by benoit.b...@gmail.com
on 17 Feb 2014 at 12:31
Need to be clear about "reproduce the problem". I see 3 images being displayed,
two of which are identical, because their source images are identical and one
which is different. It looks exactly as expected to me.
I believe the R values showing in generated-sources are furphies.
The values n R.txt are:
int drawable ic_launcher 0x7f020000
int drawable idea 0x7f020001
int drawable lib_launcher 0x7f020002
int id start_library 0x7f050000
int layout library_main 0x7f030000
int layout main 0x7f030001
int string app_name 0x7f040000
which is what are being used.
Original comment by william....@xandar.com.au
on 17 Feb 2014 at 12:47
Look at the background of the first textview
it is supposed to be the idea icon and not the launcher
Original comment by benoit.b...@gmail.com
on 17 Feb 2014 at 12:52
Attachments:
so this problem only occurs when we use a Lib which is using its res drawables
Original comment by benoit.b...@gmail.com
on 17 Feb 2014 at 12:54
this problem not only with drawables. The problem is that all identifiers in R
file of apklib is incorrect.
So we can easily got an NullPointerException when inflating wrong layout and
trying to get some View (for example)
Original comment by olegalex...@gmail.com
on 17 Feb 2014 at 1:02
i think this issue appears as a side effect of fixing another issue:
"too many fields in R file" - when R file of every apklib contained links to
each resource from the whole project.
Original comment by olegalex...@gmail.com
on 17 Feb 2014 at 1:08
It's not a side effect of that issue. it's a side effect of supporting aar.
R strings ids are perfectly fine so it fails on other id's
Original comment by benoit.b...@gmail.com
on 17 Feb 2014 at 1:10
There is no difference between String resources and other resources. I think
it is just probability that has meant we haven't seen this on String resources
yet.
Original comment by william....@xandar.com.au
on 17 Feb 2014 at 1:15
Let's do some more research. Now that we have a project that fails we can
actually investigate.
Original comment by william....@xandar.com.au
on 17 Feb 2014 at 1:16
As far as the IDs, I can also tell you that it broke since 3.6.0 - not sure
if that helps at all.
Original comment by mala...@playhaven.com
on 17 Feb 2014 at 1:36
please, refer to GeneratedSourcesMojo -> generateApkLibRs() method.
It generates R files for apklibs only based on apklib resources(+ their
dependencies).
But Apk project has lot more resources (apklib resources + its own resources),
so R file has lot more identifiers.
As a result we have id mismatch in R.class from apklib and R.class from apk.
Original comment by olegalex...@gmail.com
on 17 Feb 2014 at 1:42
>> As far as the IDs, I can also tell you that it broke since 3.6.0 - not sure
if that helps at all.
No, this issue appears at 3.8.2 (at 3.8.1 no such problem appears(including
3.6.0))
Maybe you have met another issue at 3.6.0
Original comment by olegalex...@gmail.com
on 17 Feb 2014 at 1:52
No, I meant 3.6.0 didn't have this problem.
Original comment by mala...@playhaven.com
on 17 Feb 2014 at 2:21
I have found possible solution, will make pull-request soon.
Original comment by olegalex...@gmail.com
on 17 Feb 2014 at 8:05
Sample app that shows the problem.
-Ptest to run tests that shows the error (works without -PFAIL)
-PFAIL to use 3.8.2
-PSTILL_FAILING to use 3.8.3-SNAPSHOT
https://github.com/tobias-/maven-multilib-sample-app
Tests could probably be converted to normal unit tests (instead of
instrumentation), but this I made a boiler plate app instead so that it didn't
just end up a one-shot test case.
Original comment by tob...@olsson.be
on 17 Feb 2014 at 8:24
made a pull-request, waiting for review
Original comment by olegalex...@gmail.com
on 17 Feb 2014 at 9:04
Issue 443 has been merged into this issue.
Original comment by william....@xandar.com.au
on 17 Feb 2014 at 10:18
fixed in 3.8.3-SNAPSHOT
Original comment by benoit.b...@gmail.com
on 18 Feb 2014 at 6:25
Confirmed. I used apktool to verify that my IDs now match. =)
Original comment by mala...@playhaven.com
on 18 Feb 2014 at 6:58
Sorry for the "me too", but I just wanted to confirm that my test case works
too. Current 3.8.3-SNAPSHOT fixes this issue.
Original comment by tob...@olsson.be
on 18 Feb 2014 at 9:12
Fixed in 3.8.3 snapshot .. will go out with 3.8.3 soon
Original comment by mosa...@gmail.com
on 21 Feb 2014 at 9:40
Sorry, but when this version 3.8.3 will be available? Have the same problem in
2 projects.
Original comment by Geleznod...@gmail.com
on 16 May 2014 at 9:11
3.9.0-rc.1 has already been released. It should have been fixed in that. So you
can give it a go.
We are preparing for 3.9.0-rc.2 which fixes some other issues. But that may be
weeks away.
Original comment by william....@xandar.com.au
on 16 May 2014 at 9:25
Original issue reported on code.google.com by
olegalex...@gmail.com
on 16 Jan 2014 at 8:52Attachments: