Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.

javac error: Source option 1.5 is no longer supported #138

Closed
broesamle opened this issue Jun 11, 2017 · 2 comments
Closed

javac error: Source option 1.5 is no longer supported #138

broesamle opened this issue Jun 11, 2017 · 2 comments

Comments

@broesamle
Copy link

Good afternoon,
doing

[~/projets]$ cargo init --bin hellodroid_e
     Created binary (application) project
[~/projets]$ cd hellodroid_e
[~/projets/hellodroid_e]$ cargo apk

I get the following compile error:

-compile:
    [javac] Compiling 2 source files to /home/broe/projets/target/android-artifacts/build/bin/classes
    [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.
    [javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.

NDK version: 14.1.3816874
SDK tools: 26.0.2
Android Studio: 2.3.2
Ubuntu: 16.04

Maybe the SDK/NDK and the included javac is too new and does not accept some of the glue code any more? (Not a java expert...)

(NOTE: I had to install manually some parts manually from tools_r25.2.5-linux in order to get the built process to work.)

@broesamle
Copy link
Author

the full console output:

~/projets]$ cargo init --bin hellodroid_e
     Created binary (application) project
[~/projets]$ cd hellodroid_e
[~/projets/hellodroid_e]$ cargo apk
  Cargo-Apk: Compiling android_native_app_glue.c
  Cargo-Apk: Compiling injected-glue
  Cargo-Apk: Compiling injected-glue
  Cargo-Apk: Compiling glue_obj
  Cargo-Apk: Compiling crate
   Compiling hellodroid_e v0.1.0 (file:///home/broe/projets/hellodroid_e)
    Finished dev [unoptimized + debuginfo] target(s) in 0.37 secs
  Cargo-Apk: Invoking ant
Error executing ["ant", "debug"]
Status code 1
Stdout
--------------------
Buildfile: /home/broe/projets/hellodroid_e/target/android-artifacts/build/build.xml

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 26.0.2
 [checkenv] Installed at /home/broe/Android/Sdk

-setup:
     [echo] Project Name: hellodroid_e
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 25.0.3
     [echo] Resolving Build Target for hellodroid_e...
[gettarget] Project Target:   Android 4.3.1
[gettarget] API level:        18
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: /home/broe/projets/hellodroid_e/target/android-artifacts/build/res
    [mkdir] Created dir: /home/broe/projets/hellodroid_e/target/android-artifacts/build/bin
    [mkdir] Created dir: /home/broe/projets/hellodroid_e/target/android-artifacts/build/bin/res
    [mkdir] Created dir: /home/broe/projets/hellodroid_e/target/android-artifacts/build/bin/rsObj
    [mkdir] Created dir: /home/broe/projets/hellodroid_e/target/android-artifacts/build/bin/rsLibs
    [mkdir] Created dir: /home/broe/projets/hellodroid_e/target/android-artifacts/build/gen
    [mkdir] Created dir: /home/broe/projets/hellodroid_e/target/android-artifacts/build/bin/classes
    [mkdir] Created dir: /home/broe/projets/hellodroid_e/target/android-artifacts/build/bin/dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for hellodroid_e...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency] 
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 2 source files to /home/broe/projets/hellodroid_e/target/android-artifacts/build/bin/classes
    [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.
    [javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.
Stderr
--------------------

BUILD FAILED
/home/broe/Android/Sdk/tools/ant/build.xml:716: The following error occurred while executing this line:
/home/broe/Android/Sdk/tools/ant/build.xml:730: Compile failed; see the compiler error output for details.

Total time: 0 seconds

@mb64
Copy link
Contributor

mb64 commented Jul 30, 2019

Fixed by #223.

@mb64 mb64 closed this as completed Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants