Oren K.
Oren K.

Reputation: 97

Is java sdk version in android library affects java version of the project using it?

I have my own android library (sdk) and i am considering moving to Java 8. i don't see any documentation about how it affects the customers that use my sdk. Can it cause problems ? do they need to change something in their code ?

Upvotes: 0

Views: 85

Answers (1)

Murat Karagöz
Murat Karagöz

Reputation: 37594

If you compile your library with Java 8 by using e.g. in the build.gradle

sourceCompatibility = 1.8
targetCompatibility = 1.8

then any android project below Java 8 will not work with your sdk. Even if you do not use any Java 8 Methods. This will probably change with Android Studio 3.0 where Java 8 will be shipped built-in.

As of now Java 8 is no supported below Android Studio < 3.0 - even with the deprecated jack toolchain.

Upvotes: 1

Related Questions