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

Building my game for android, getting java error?!?r

Discussion in 'Android' started by GreenBoxInteractive, Apr 2, 2015.

  1. GreenBoxInteractive

    GreenBoxInteractive

    Joined:
    Mar 23, 2015
    Posts:
    135
    I am building my game, it worked fine before, then I added Unity Ads now I get this error.


    Error building Player: Win32Exception: ApplicationName='S:\Program Files (x86)\Java\jre1.8.0_40\bin\javac.exe', CommandLine='-bootclasspath "S:/Users/Curt/AppData/Local/Android/sdk/platforms/android-21\android.jar" -d "S:\Users\Curt\Desktop\StackIt\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8 "com\GreenBoxInteractive\StackIt\R.java" "com\unity3d\ads\android\R.java"', CurrentDirectory='S:\Users\Curt\Desktop\StackIt\Temp\StagingArea\gen'
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    There should be a more detailed error message, see the console window (and post it here)
     
  3. GreenBoxInteractive

    GreenBoxInteractive

    Joined:
    Mar 23, 2015
    Posts:
    135
    This is from the console window
     
  4. GreenBoxInteractive

    GreenBoxInteractive

    Joined:
    Mar 23, 2015
    Posts:
    135
     
  5. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    It's hard to determine the source of error without more information...

    Which version of Unity are you using ?
    Also, do you have any java plugins (.jar files or Android libraries) in your project ?
     
  6. Jami_2

    Jami_2

    Joined:
    Apr 22, 2013
    Posts:
    19
    Two options i check when i run in error.

    First check your Java JDK is correct installed.

    Second if i make a Update of such Addons that goes in Plugin Folder. Check for double jar Files.
     
  7. GreenBoxInteractive

    GreenBoxInteractive

    Joined:
    Mar 23, 2015
    Posts:
    135
    I added Unity Ads, I'm kinda new to all this I'm not aware of all the terms. I'll check my JDK when I am home.
     
  8. Jami_2

    Jami_2

    Joined:
    Apr 22, 2013
    Posts:
    19
    Unity Ads make significante changes. Best way for find out. Delete all folders in your project from unityads and import it again. Delete the device.jar from Plugin/Android.
     
    GreenBoxInteractive likes this.
  9. GreenBoxInteractive

    GreenBoxInteractive

    Joined:
    Mar 23, 2015
    Posts:
    135
    I am on 4.5.5f and there a .jar files in the Unity Ads.
     
  10. GreenBoxInteractive

    GreenBoxInteractive

    Joined:
    Mar 23, 2015
    Posts:
    135
    I fixed this by installing the 32 bit Java JDK