API 31 Error: Your app currently targets API level 30 and must target at least API level 31

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gshearne
Posts: 36
Joined: Mon Jun 02, 2014 4:41 am

API 31 Error: Your app currently targets API level 30 and must target at least API level 31

Post by gshearne » Sat Jan 07, 2023 11:37 pm

Hi,
I am running 9.6.8. My SDK is up to date with API 31-33 and the latest tools (per a previous post). Every time I try to add the bundle in the Play Store I get the error: Your app currently targets API level 30. and must target at least API level 31

I also tried 9.6.1. I got the error: Your app currently targets API level 29 and must target at least API level 31

I tried modifying the C:\Program Files\RunRev\LiveCode 9.6.8\Runtime\Android\manifest.xml to force 31 (per a previous post) but got a compile error.

Any ideas would be appreciated.
Thanks
Greg
Attachments
Screenshot 2023-01-07 150228.png

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: API 31 Error: Your app currently targets API level 30 and must target at least API level 31

Post by mwieder » Sun Jan 08, 2023 4:33 am

Right. LC 9.6.8 out of the box supports up to API 30.
Just a thought, but maybe change line 258 of stack "revDeployLibraryAndroid" from

Code: Select all

constant kDeployAndroidTargetSDK = "30"
to

Code: Select all

constant kDeployAndroidTargetSDK = "31"
and add

Code: Select all

  put "12 - API 31" into tMap[31]
to the end of function deployGetVersionsMap

gshearne
Posts: 36
Joined: Mon Jun 02, 2014 4:41 am

Re: API 31 Error: Your app currently targets API level 30 and must target at least API level 31

Post by gshearne » Sun Jan 08, 2023 2:54 pm

Thanks.

Afraid now I am getting a new error though:

You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported

BTW - Your comment about 9.6.8 only supporting API 30 led me to try 10.0 dp 4. That did not work either - same API 31 error.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: API 31 Error: Your app currently targets API level 30 and must target at least API level 31

Post by mwieder » Sun Jan 08, 2023 4:57 pm

Yes - LC 9.6.9-rc2 supports API 31 but the LC 10-dp release is still based on the older code base so only goes to API 30.

gshearne
Posts: 36
Joined: Mon Jun 02, 2014 4:41 am

Re: API 31 Error: Your app currently targets API level 30 and must target at least API level 31

Post by gshearne » Fri Jan 13, 2023 12:12 am

I wanted to send my thanks. I was able to buil and deploy with LC 9.6.9rc2. Regards, Greg

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”