Android target API level 28 required from August 2019

Since November 2018, all app updates on Google Play have been required to target API level 26 (Android 8.0) or higher. Google will soon raise the required target API level to 28 for new apps:

  • August 2019: New apps are required to target API level 28 (Android 9) or higher.
  • November 2019: Updates to existing apps are required to target API level 28 or higher.

What does this mean for you? Very little really. What you need to do is to open your game.project file, jump to the Android section and change Target Sdk Version from 26 to 28.

We will in the next release, scheduled for the 5th of August, increase the default value to 28 and update the underlying Android SDK used when bundling for Android.

If you do run into any problems please reach out to us and we’ll work together with you to find a solution or workaround.

6 Likes

Does this mean anything for native extensions? Do we have to rebuild our extensions with a newer SDK / targeting a different API level (currently things are built to target API level 14 for 32-bit ARM and 21 for 64-bit ARM)?

What do you mean with building them with specific target API levels? Do you have some prebuilt C++ libraries in the native extension that are built with some specific target API flags? Or do you bundle the app differently for armv7 and arm64, with different target API levels?

In all honesty, I’m not 100% sure myself, but I think it’s best to build everything for the same target API level. I would simply suggest that you try it yourself, see if you get any warnings/errors from Google Play store.

Yes, this. They’re built using different -target flags: https://github.com/dapetcu21/defold-fmod/blob/master/bridge/Makefile.android

They’re done this way to match the way the FMOD libraries are compiled.

Yeah, I should do that.

1 Like

When is this update expected? Thanks!

You’re able to set target API level in game.project now. You don’t have to wait for anything. We had planned to also update the Android SDK we use when building but that will be delayed for another two weeks (we have a four week release cycle over summer).

Unfortunately this does not seem to be a good solution for me. Just very briefly about my problem. I would like to use google play-services-ads version 18.1.1 in my native extension. This has dependencies that require androidx libraries and are available from android sdk version 28. If these dependencies are built into the native extension, they will be confused with the v4 support libraries used by Defold.

Here comes the well-known error:

warning: [options] bootstrap class path not set in conjunction with -source 1.6
java.lang.RuntimeException: Translation has been interrupted
	at com.android.dx.command.dexer.Main.processAllFiles(Main.java:608)
	at com.android.dx.command.dexer.Main.runMultiDex(Main.java:366)
	at com.android.dx.command.dexer.Main.run(Main.java:275)
	at com.android.dx.command.dexer.Main.main(Main.java:245)
	at com.android.dx.command.Main.main(Main.java:106)
Caused by: java.lang.InterruptedException: Too many errors
	at com.android.dx.command.dexer.Main.processAllFiles(Main.java:600)
	... 4 more

Maybe I’m trying to find a solution.

Ah, I see. Well if everything goes according to plan this will be released Monday in two weeks. I’m not sure there’s much your can do before that. @mathias.westerdahl?

The next release will be on the 19th of 20th of August. This release will include an update of the Android SDK, but I’m not sure if it will include a transition from v4-compat to androidx packages.

2 Likes

Thanks for the info! I am hoping that it will include androidx (or later) :slight_smile: In theory, androidx also provides backwards compatibility. Unfortunately, more and more newer packages have androidx dependencies. Another great feature would be if native extensions handled aar packages.

The initial change included migration to androidx as well, but we couldn’t follow this through since the Facebook library wasn’t compatible. Hopefully we can look at this soon again, the main prio now was to just get the updated SDK usage out the door.

3 Likes

How do you mean out the door? Thanks!

He means in the next release.
We expect this SDK upgrade to happen in 1.2.160

1 Like

Thanks to the Defold team, Google Play Services has been removed from the engine with version 1.2.162! This opened up the opportunity for me to integrate the latest version of Google Play Services Ads (18.2.0), which has androidx dependencies. The operation was successful, and I created the dependencies needed for my admob native extension using the pompom script. My game is built and running smoothly. :v::partying_face:

6 Likes