Search Unity

Android aar vs jar

Discussion in 'Android' started by TheHighGround, Aug 16, 2018.

  1. TheHighGround

    TheHighGround

    Joined:
    Nov 19, 2017
    Posts:
    68
    Hello,

    I'm writing a plugin and at first I was using the class.jar and just renaming the jar file and everything worked fine. My library then required certain permissions so I exported a .aar file that includes the AndroidManifest.xml that will be merged with Unity's. So now I get a
    AndroidJavaException: java.lang.ClassNotFoundException even though it works with .jar.

    Any suggestions as to what's the problem?
     
  2. TheHighGround

    TheHighGround

    Joined:
    Nov 19, 2017
    Posts:
    68
    I'm a dumbass you can delete this.
     
  3. sripadkowshik

    sripadkowshik

    Joined:
    Oct 23, 2017
    Posts:
    3
    Hey. If you don't mind can you post your solution. I am also trying to learn how to build plugins and use it with Unity. The solution you provide maybe of help to me in the future.

    Thanks.
     
  4. TheHighGround

    TheHighGround

    Joined:
    Nov 19, 2017
    Posts:
    68
    I had changed the package name and so I didn't update the namespace in Unity that calls that specific class so it kept giving me the ClassDef error.