Search Unity

Cannot Build After adding unityPlayerActivity based plugin

Discussion in 'Android' started by hindsm, Jul 15, 2016.

  1. hindsm

    hindsm

    Joined:
    Jul 15, 2016
    Posts:
    1
    Hello,
    I am developing an android app that needs to access the Bluetooth capabilities of the android device to receive information from a custom sensor. Originally I was not using a java class that extended unityPlayerActivity but decided to implement this approach to see if I could get better results. (The old plugin had trouble communicating from the android code to the unity engine piece I think). Anyway, ever since I added this new .aar file to the assets folder I have build unable to build my project. It seems to be a problem with extracting the classes.java file from the android archive. I've been unable to find this exact problem on the solution to similar problems have not been helpful. Please, if anyone can help I'm at my wits end.

    The Console errors are as follows:
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    I've seen this error come up when including Android libraries that contain no code.

    The error fails to copy classes.jar from a library called btlibrary-release. Do you have such a library in either an Android library folder structure or as an .aar in your project? does this library contain code?

    I think Unity assumes that the library includes compiled code (maybe all libraries must include compiled code ?) so it tries to copy the classes.jar file from that library. If such a file doesn't exist it fails.

    There probably should be a nicer error message for such a scenario...
     
  3. vr3io

    vr3io

    Joined:
    Nov 9, 2015
    Posts:
    2