3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Androidのmapbox sdkを6.xにしたら 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) エラー

Posted at

AndroidのmapboxのSDKのバージョンを6系に上げたところ以下のエラーが出力されビルドできませんでした。

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)

まさかmin sdk versionを24にしないといけないのかと思い絶望しましたが、appのbuild.gradleに以下を記述することでビルドできるようになりました。

// android{}内に追記
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

参考
https://github.com/mapbox/mapbox-gl-native/issues/11735

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?