Delphi Android app API level 26?
Asked Answered
R

2

5

I got my app into Google Play's app store but I also got this warning:

Your app currently targets API level 14 and must target at least API level 26 to ensure it is built on the latest APIs optimized for security and performance.

From August 2018, new apps must target at least Android 8.0 (API level 26). From November 2018, app updates must target Android 8.0 (API level 26).

How do I get Delphi 10.2.3 to "target API level 26"?

Rakeoff answered 21/6, 2018 at 1:15 Comment(7)
That's rather trivial. Open the Android tools and select to install those API packages. Then configure your Delphi to use them. It's all clearly documented.Ovular
In order to target API level 26, the manifest needs the targetSdkVersion changed to 26, as per my article: delphiworlds.com/2018/05/targeting-android-8-and-higherAdapt
Why does no one read the documentation, which clearly explains how to do this? It even has images to illustrate the process.Dedra
Except that configuring Delphi to use a different SDK is not the same thing as targeting an SDK in the actual applicationAdapt
I'm facing the same issues right now. I have API 26 in the SDK propeties set within Delphi, but the actual targeted API is still 14 for some reason.Larousse
@DaveNottage, quite right indeed, it's not. Jerry Dodge and Ken White, please read what the question is asking before jumping in and referring to or linking to documentation that has little or nothing to do with the actual question. Targeting an API level is markedly different from 'linking' to a later SDK. Targeting an SDK is required to conform to Google's forthcoming requirements. Linking against a different SDK will not allow you to pass the new requirements.Encumbrance
@ShaunRoselt You need to modify the AndroidManifest.template.xml file, namely replace %targetSdkVersion% with 26.Adapt
P
2

See https://community.embarcadero.com/blogs/entry/deadline-approaching-google-s-new-android-api-level-26-requirements.

Option 1: Get the 10.3 Beta Release including support for Android API level 26 The change to support Android API level 26 requires significant work, and is not possible in a 10.2 update. We plan to deliver full support for Android API level 26 in the next major release of RAD Studio, 10.3. While this release will take some more time, we understand that some customers require a solution soon. We will invite all customers on active Update Subscription to join our upcoming 10.3 Beta (under NDA). More details on the Beta and how to sign up will be shared in the coming weeks over email - check your inbox. The 10.3 beta will allow you to target Android API level 26. Although the usual beta restrictions do not allow for building and deploying production apps, this beta will have a special EULA provision allowing you to deploy (production) Android apps to the Google Play Store. Being able to participate in our Beta program is one of the great benefits of Update Subscription. You can check how many days you have remaining on your Update Subscription using the License Manager.

Option 2: Using 10.2.3 In lieu of using the 10.3 beta to deliver Android API level 26 ready apps, another option is to follow Embarcadero MVP Dave Nottage’s excellent blog post on how to target Android API Level 26 with Delphi, C++Builder and RAD Studio 10.2.3 Tokyo: http://delphiworlds.com/2018/06/targeting-android-8-and-higher-continued/

Pontic answered 28/8, 2018 at 14:51 Comment(0)
L
4

Go to the AndroidManifest.template.xml file within your Delphi project directory and then change the "android:targetSdkVersion" from "%targetSdkVersion%" to "26". This was a bug in Delphi 10.2.3. It's now fixed in Delphi 10.3.2 and later.

Also make sure that you have Android API 26 selected within the Delphi SDK Manager Properties.

See also Deadline Approaching: Google’s new Android API level 26 Requirements.

Larousse answered 28/6, 2018 at 7:41 Comment(1)
It seems the %targetSdkVersion% placeholder value is hard-coded into the RAD Studio IDE, as updating to 10.3.3 writes "<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" />" to the generated Androidmanifest.xml file in the output directory of my apps.Cockerel
P
2

See https://community.embarcadero.com/blogs/entry/deadline-approaching-google-s-new-android-api-level-26-requirements.

Option 1: Get the 10.3 Beta Release including support for Android API level 26 The change to support Android API level 26 requires significant work, and is not possible in a 10.2 update. We plan to deliver full support for Android API level 26 in the next major release of RAD Studio, 10.3. While this release will take some more time, we understand that some customers require a solution soon. We will invite all customers on active Update Subscription to join our upcoming 10.3 Beta (under NDA). More details on the Beta and how to sign up will be shared in the coming weeks over email - check your inbox. The 10.3 beta will allow you to target Android API level 26. Although the usual beta restrictions do not allow for building and deploying production apps, this beta will have a special EULA provision allowing you to deploy (production) Android apps to the Google Play Store. Being able to participate in our Beta program is one of the great benefits of Update Subscription. You can check how many days you have remaining on your Update Subscription using the License Manager.

Option 2: Using 10.2.3 In lieu of using the 10.3 beta to deliver Android API level 26 ready apps, another option is to follow Embarcadero MVP Dave Nottage’s excellent blog post on how to target Android API Level 26 with Delphi, C++Builder and RAD Studio 10.2.3 Tokyo: http://delphiworlds.com/2018/06/targeting-android-8-and-higher-continued/

Pontic answered 28/8, 2018 at 14:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.