java - Gradle compiling android.jar error -> It is recommended that the compiler be upgraded -
i'm compiling gradlew assemblerelease
in linux server console (no visual interface available).
when compiling error shown lot of times:
err:it recommended compiler upgraded. err:warning: /users/mo/documents/android-sdk/platforms/android-22/android.jar(android/text/spannablestring.class): major version 51 newer 50, highest major version supported compiler.
it means must update java installed on server? how can done command line in linux machine?
thanks
afaik major version means java version. java 7 51, java 6 50. code written java 7, guess? make error go away, suppose should following:
update java 7 system package manager (you may wanna here , here idea how it). in general, need perform
yum install java-1.7.*-openjdk
newer version, in cases things bit more difficult. didn't tell linux using, so..add
build.gradle
:compileoptions { sourcecompatibility javaversion.version_1_7 targetcompatibility javaversion.version_1_7 }
and make sure $java_home points new java version. that's it.
Comments
Post a Comment