Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Please be sure to include as much information as possible:
Environment details
- Specify the API at the beginning of the title (for example, "Places: ..."): Kotlin Compiler
- OS type and version: Yes
- Library version and other environment information: `com.google.maps.android:maps-ktx:5.1.0
Steps to reproduce
- Have an build that produces java 11 compatible bytecode i..e
android.kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
or whatever it is preferred these days
2. Call com.google.maps.android.ktx.awaitMap in the source code
3. Compile the app

Expected: The project compiles just fine
Actual: compileDebugKotlin fails with Cannot inline bytecode built with JVM target 17 into bytecode that is being built with JVM target 11. Please specify proper '-jvm-target' option.
My reasoning why this is a bug:
- Such breaking change was released in minor version bump. I'm not sure which java version targets
5.0.0 but it compiles just fine for a project targeting Java 11
- Release notes don't mention that change at all
- only some of Java 11 and 17 APIs are available via desugaring on Android, we're still far from most of the devices being able to run (even desugared) Java 17 code. Plus desugaring isn't yet enforced or even enabled by default
- According to https://developer.android.com/build/jdks#compileSdk Java 17 runtime is available only starting from API 34
More insights:
Related articles:
Code example
# example
fun repro(map : com.google.android.gms.maps.MapView) = map.awaitMap()
Stack trace
# example
`Cannot inline bytecode built with JVM target 17 into bytecode that is being built with JVM target 11. Please specify proper '-jvm-target' option.`
Following these steps will guarantee the quickest resolution possible.
Thanks!
Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Please be sure to include as much information as possible:
Environment details
Steps to reproduce
or whatever it is preferred these days

2. Call
com.google.maps.android.ktx.awaitMapin the source code3. Compile the app
Expected: The project compiles just fine
Actual: compileDebugKotlin fails with
Cannot inline bytecode built with JVM target 17 into bytecode that is being built with JVM target 11. Please specify proper '-jvm-target' option.My reasoning why this is a bug:
5.0.0but it compiles just fine for a project targeting Java 11More insights:
Related articles:
Code example
Stack trace
Following these steps will guarantee the quickest resolution possible.
Thanks!