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. Dismiss Notice

I can no longer build to Android since Android sdk update

Discussion in 'Android' started by arkon, Nov 23, 2014.

  1. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    I've just updated the android sdk to the latest and when I build to Android I now get this error:

    Error building Player: CommandInvokationFailure: Failed to recompile android resource files. See the Console for details.
    /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/javac -bootclasspath "/myapps/Android/sdk/platforms/android-17/android.jar" -d "/MyApps/ios/Unity4/GoldenCherry/GoldenCherry/Temp/StagingArea/bin/classes" -source 1.6 -target 1.6 -encoding UTF-8 "com/google/android/gms/R.java" "com/mQED/SlotsGoldenCherry/R.java"

    stderr[
    javac: invalid source release: 1.6
    Usage: javac <options> <source files>
    where possible options include:
    -g Generate all debugging info
    -g:none Generate no debugging info
    -g:{lines,vars,source} Generate only some debugging info
    -nowarn Generate no warnings
    -verbose Output messages about what the compiler is doing
    -deprecation Output source locations where deprecated APIs are used
    -classpath <path> Specify where to find user class files
    -cp <path> Specify where to find user class files
    -sourcepath <path> Specify where to find input source files
    -bootclasspath <path> Override location of bootstrap class files
    -extdirs <dirs> Override location of installed extensions
    -endorseddirs <dirs> Override location of endorsed standards path
    -d <directory> Specify where to place generated class files
    -encoding <encoding> Specify character encoding used by source files
    -source <release> Provide source compatibility with specified release
    -target <release> Generate class files for specific VM version
    -version Version information
    -help Print a synopsis of standard options
    -X Print a synopsis of nonstandard options
    -J<flag> Pass <flag> directly to the runtime system

    ]
    stdout[

    ]

    What have I done wrong?
     
  2. DalerHakimov

    DalerHakimov

    Joined:
    Mar 14, 2014
    Posts:
    302
    Try to update your Java also and see if it works. Also check the JAVA_HOME variable, if it links to the right place. That error seems like a java version error.
     
  3. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    thanks. A reinstall of the android sdk seems to have fixed it.