You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Revert support for java 1.7 or figure a way to use java 8 features while maintaining compatibility for Android before N #832
This issue was already brought up here : mapbox/mapbox-gl-native#11392 and solution was going back to 1.7, this is most likely the PR that caused this issue: #770
Expected Behavior
Everything compiles while supporting lowest android sdk supported by mapbox: 14.
Current Behavior
App won't compile unless i target Android N
AGPBI: {"kind":"error","text":"Static interface methods are only supported starting with Android N (--min-api 24): com.mapbox.geojson.Geometry com.mapbox.geojson.Geometry.fromJson(java.lang.String)","sources":[{}],"tool":"D8"}
App won't compile unless i target Android N, the shown error can throw you off but you don't actually need to target Android N to use java8 language features.
From your java8-support link:
After that, for each module that uses Java 8 language features (either in its source code or through dependencies), update the Source Compatibility and Target Compatibility to 1.8 in the Project Structure dialog as shown in figure 2 (click File > Project Structure).
so you are required to use the following in your build.gradle:
android {
...
// Configure only for each module that uses Java 8
// language features (either in its source code or
// through dependencies).
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
This issue is not actionable for us, java8 is the way forward.
Haven't seen this was updated back to 1.8 in 12041. No one had a chance to cause him any issues there yet most likely though.
If MapBox decided to stay with 1.8 it would be nice to have it explicitly written to change the compile options in readme and other places (website) , this will be especially the case for main mapbox dependency when it gets updated as many people that are using kotlin and don't have java 1.8 options enabled will stumble upon this. The error logs from compiler are nowhere helpfull and suggest that only possible solution is jumping on 24 sdk and it's the first time i am coming across such issue.
Anyway for me that seems to fix the issue as the app started to compile back again thanks for fast response.
Activity
tobrun commentedon Jun 7, 2018
App won't compile unless i target Android N, the shown error can throw you off but you don't actually need to target Android N to use java8 language features.From your java8-support link:
so you are required to use the following in your build.gradle:
This issue is not actionable for us, java8 is the way forward.
osana commentedon Jun 7, 2018
@freszu FYI https://github.com/mapbox/mapbox-java/issues/12041 brought Java8 back in gl-native as well
freszu commentedon Jun 7, 2018
Haven't seen this was updated back to 1.8 in 12041. No one had a chance to cause him any issues there yet most likely though.
If MapBox decided to stay with 1.8 it would be nice to have it explicitly written to change the compile options in readme and other places (website) , this will be especially the case for main mapbox dependency when it gets updated as many people that are using kotlin and don't have java 1.8 options enabled will stumble upon this. The error logs from compiler are nowhere helpfull and suggest that only possible solution is jumping on 24 sdk and it's the first time i am coming across such issue.
Anyway for me that seems to fix the issue as the app started to compile back again thanks for fast response.