Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

5.2.2 Manifest merge bug!

Discussion in 'Android' started by vladrybak, Nov 17, 2015.

  1. vladrybak

    vladrybak

    Joined:
    Aug 30, 2013
    Posts:
    108
    Hello,
    I'm using Parse.com in my project for push notifications.
    In Unity 5.2.2 i'm now unable to build on Android. When converting to dex format, there is error says - permission already added. I figured out that this error caused by this permission. Unity can't convert manifest with this two strings:
    <permission android:protectionLevel="signature" android:name="BUNDLE_NAME_FOR_REPLACE.permission.C2D_MESSAGE" />
    <uses-permission android:name="BUNDLE_NAME_FOR_REPLACE.permission.C2D_MESSAGE" />
    I think this is a bug. Can anybody confirm that and say when it will be fixed?
    In 5.2.2p4 it's still there.
     
  2. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    530
    Can you give some details on the error? We are currently using the Manifest merge tool provided with Android SDK. If it is the merge that goes wrong we need to file a bug with Google.
     
  3. vladrybak

    vladrybak

    Joined:
    Aug 30, 2013
    Posts:
    108
    Merge is ok, the error occures when unity converting java class to dex format.
    CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details.
    C:\Program Files\Java\jdk1.8.0_66\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/ANDROID/android-sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\androidplayer/Tools\sdktools.jar" -

    stderr[
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/maxnick/pluginsystem/Manifest$permission;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/maxnick/pluginsystem/Manifest;
    2 errors; aborting
     
  4. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    530
    Please file a bug on that issue, it's very hard to see what is wrong without access to the project. What the error says is that you have multiple java classes with the name com/maxnick/pluginsystem/Manifest.
     
  5. vladrybak

    vladrybak

    Joined:
    Aug 30, 2013
    Posts:
    108
    I can't reproduce this issue on empty project. So the problem is in integration of parse android sdk to my plugin. I'll try to understand whats wrong...