Open collinalexbell opened 7 years ago
On Macbook pro 2015 (10.12.4) with java version "1.7.0_80" I'm getting same problem.
@AetherQuinque The way I got it to work was upgrade Java to version 1.8, then I changed javac-options to use 1.7 for both source and target in my project.clj
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
Finally, I had to manually download and replace a dependency annotations.jar
in /path/to/sdk/tools/support/
which can be found here: https://mvnrepository.com/artifact/com.google.android/annotations/4.1.1.4
I am currently searching for a way to take this project into using Java8 and Clojure 1.9, but I think I might need help from @alexander-yakushev to get an idea of what would need to be done. Lein-droid uses its own modified branch of clojure.core it seems.
Thanks @SlightlyCyborg I hit this problem today.
And your solution above (including updating the annotations.jar) solved it.
I also found this http://java.wekeepcoding.com/article/10014189/Android%27s+SDKs+are+compiled+in+Java8+since+Android+studio+2.3%2C+but+I+can%27t+use+dk+build+tool+with+Java8. which might help someone
I am running 16.06 Ubuntu on a MacBook Air with both openjdk-7 and openjdk-8 installed. I have installed Android Studio 2.3.1
Android Studio post SDK 24 ships with the 1.8 JRE. This means that it compiles the SDK using JDK 1.8
I am getting problems running lein droid.
If I use openjdk-7 as my java I produce this error while compiling code.
android/util/Log was compiled with jdk8
If I use openjdk-8 as my java it produce this error after compiling all the clojure.
By "use x as my java" I mean I run
sudo update-alternatives --config java
which allows me to change the output ofjava -version