Found duplicate file for APK: AndroidManifest.xml

10,284

If the library is not using any Android code it can be a plain jar and needs no manifest. If it does use Android code you still just package it up as a jar and reuse. This has all gotten much better with r14 of the SDK. Use that or the Android Maven Plugin for reusing Android code with the apklib project type.

As of 3.9.0-rc2 of the android mavne plugin you can also create an aar.

Share:
10,284
Michael Fransen
Author by

Michael Fransen

Updated on June 04, 2022

Comments

  • Michael Fransen
    Michael Fransen almost 2 years

    I recently split some code out into an Android library project. I added references to that project from my application project. I know get an error that states this "Error generating final archive: Found duplicate file for APK: AndroidManifest.xml". I am assuming this has something to do with the library project having an AndroidManifest.xml file as well. What do I need to do to get rid of this error.

  • David Doria
    David Doria over 10 years
    I have the same problem as the original question. What I did was "just package it up as a jar and reuse", but that is what led to the error :). Any other tips?