You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Alexander Borgschulze <bo...@web.de> on 2020/04/14 09:03:53 UTC
Can I use Apache-Flink for Android API-Level < 26?
I am trying to use Apache-Flink in my Android-Project with "minSdkVersion 24".
Unfortunately, the following code causes an error:
val env: StreamExecutionEnvironment = LocalStreamEnvironment.getExecutionEnvironment()
env.streamTimeCharacteristic = TimeCharacteristic.ProcessingTime
val integerStream: DataStream<Int> = env.fromCollection(mutableListOf(1,2,3,4,5))
integerStream.print()
env.execute()
java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Instant;
at org.apache.flink.api.common.typeinfo.BasicTypeInfo.<clinit>(BasicTypeInfo.java:89)
at org.apache.flink.api.common.typeinfo.BasicTypeInfo.getInfoFor(BasicTypeInfo.java:214)
at org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForClass(TypeExtractor.java:1705)
at org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForClass(TypeExtractor.java:1643)
at org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForObject(TypeExtractor.java:2038)
at org.apache.flink.api.java.typeutils.TypeExtractor.getForObject(TypeExtractor.java:1983)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.fromCollection(StreamExecutionEnvironment.java:782)
The java.time API was introduced in API Level 26. So is it impossible to run
Flink on older Android-Verions?
Re: Can I use Apache-Flink for Android API-Level < 26?
Posted by Chesnay Schepler <ch...@apache.org>.
I agree with your conclusion that you cannot use Flink on an API Level
below 26.
I do not know whether it will work even with Level 26 though, as I'm not
aware of anyone having tried it.
On 14/04/2020 11:03, Alexander Borgschulze wrote:
> I am trying to use Apache-Flink in my Android-Project with
> "minSdkVersion 24".
> Unfortunately, the following code causes an error:
> val env: StreamExecutionEnvironment =
> LocalStreamEnvironment.getExecutionEnvironment()
> env.streamTimeCharacteristic = TimeCharacteristic.ProcessingTime
> val integerStream: DataStream<Int> =
> env.fromCollection(mutableListOf(1,2,3,4,5))
>
> integerStream.print()
> env.execute()
>
> java.lang.NoClassDefFoundError: Failed resolution of: Ljava/time/Instant;
> at
> org.apache.flink.api.common.typeinfo.BasicTypeInfo.<clinit>(BasicTypeInfo.java:89)
> at
> org.apache.flink.api.common.typeinfo.BasicTypeInfo.getInfoFor(BasicTypeInfo.java:214)
> at
> org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForClass(TypeExtractor.java:1705)
> at
> org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForClass(TypeExtractor.java:1643)
> at
> org.apache.flink.api.java.typeutils.TypeExtractor.privateGetForObject(TypeExtractor.java:2038)
> at
> org.apache.flink.api.java.typeutils.TypeExtractor.getForObject(TypeExtractor.java:1983)
> at
> org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.fromCollection(StreamExecutionEnvironment.java:782)
> The java.time API was introduced in API Level 26. So is it impossible
> to run Flink on older Android-Verions?