BigKarel / maven-android-plugin

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

dex fails because a BuildConfig class from an aar lib is there twice #456

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Adding the following lib: https://github.com/jgilfelt/SystemBarTint
<dependency>
    <groupId>com.readystatesoftware.systembartint</groupId>
    <artifactId>systembartint</artifactId>
    <version>1.0.2</version>
    <type>aar</type>
</dependency>

What is the expected output?
Build Success

What do you see instead?
[INFO] UNEXPECTED TOP-LEVEL EXCEPTION:
[INFO] java.lang.IllegalArgumentException: already added: 
Lcom/readystatesoftware/systembartint/BuildConfig;

What version of maven-android-plugin are you using?
3.9.0-rc.1

What are the complete output lines of "mvn -version" on your machine?
3.2.1
java 1.7.0_51

Please provide any additional information below.

In this library the BuildConfig is included in the aar (classes.jar)
But for ActionBarSherlock the BuildConfig is not included in the aar (based on 
comments in the GenerateSourcesMojo).

Should the aar contain the BuildConfig or should android-maven-plugin generate 
it or should it check if it needs to generate it or not?

Original issue reported on code.google.com by benoit.b...@gmail.com on 27 Mar 2014 at 3:20

GoogleCodeExporter commented 9 years ago
Benoit can you post a link to a project that shows the issue.

Original comment by william....@xandar.com.au on 27 Mar 2014 at 4:48

GoogleCodeExporter commented 9 years ago
I took the tictactoe sample and added the dependency but I also had to change 
the minSdk & targetSdk of tictactoe otherwise the manifest merge would complain.

Original comment by benoit.b...@gmail.com on 27 Mar 2014 at 6:01

Attachments:

GoogleCodeExporter commented 9 years ago
This also happens with appcompat-v7 19.1.0 and not with 19.0.1 as the 
BuildConfig was not packaged previously

Original comment by benoit.b...@gmail.com on 1 Apr 2014 at 5:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This happens with more libs. (net.danlew:android.joda:2.3.2@aar)
and I was able to reproduce it with the current 3.9.0-SNAPSHOT

Original comment by benoit.b...@gmail.com on 10 Apr 2014 at 12:25

GoogleCodeExporter commented 9 years ago
Background info: https://code.google.com/p/android/issues/detail?id=61151

Original comment by benoit.b...@gmail.com on 14 Apr 2014 at 10:02

GoogleCodeExporter commented 9 years ago
Fix was merged in 3.9.0-SNAPSHOT

https://github.com/jayway/maven-android-plugin/pull/329
https://github.com/jayway/maven-android-plugin/pull/328

Original comment by benoit.b...@gmail.com on 24 Apr 2014 at 10:35

GoogleCodeExporter commented 9 years ago
We are no longer using the issue tracking system on Google Code. Please refile 
this issue on https://github.com/jayway/maven-android-plugin/issues if you 
still have this problem with the latest release of the Android Maven Plugin

Original comment by mosa...@gmail.com on 19 May 2014 at 4:20

GoogleCodeExporter commented 9 years ago
hi - is there a workaround for this issue?

Original comment by elisebot...@gmail.com on 9 Jun 2014 at 11:36

GoogleCodeExporter commented 9 years ago
fixed in 3.9.0-rc.2

Original comment by benoit.b...@gmail.com on 9 Jun 2014 at 11:57

GoogleCodeExporter commented 9 years ago
I just had this issue in 3.9.0-rc.2 when I included two aar dependencies. 
Workaround was to change one to an apklib.

Original comment by j.w.bax...@gmail.com on 6 Jul 2014 at 4:59

GoogleCodeExporter commented 9 years ago
This has been resolved in 
https://github.com/jayway/maven-android-plugin/pull/403
Please raise issues in the GitHub project.

Original comment by william....@xandar.com.au on 6 Jul 2014 at 10:38