Jump to content
Sign in to follow this  
John Kouraklis

Cant' deploy Android app after renaming the project

Recommended Posts

Hi,

 

I create a new FMX app, select Android as the target platform and the device, I hit Run (and/or with Debug) and all works fine. The app is deployed correctly to the device and launched.

 

Then, I save the form and again all works fine.

 

Then, I save the project and then the IDE can not build/deploy it. I get the following message:

[PAClient Error] Error: E2312 C:\****\AndroidManifest.xml:20: error: No resource identifier found for attribute 'resizeableActivity' in package 'android'

 

Even if I rename the project back to Project1, it does not work.

 

After inspecting the manifest files, the IDE adds this line android:resizeableActivity="false" which is not added when I run a new project.

 

Now, it appears that the AndroidManifest.template includes the same line but it doesn't cause problems until I save a project.

 

If I delete the line from the template, all works fine.

 

Anyone knows why that line generates an error?

 

Thx

 

 

Share this post


Link to post

android:resizeableActivity was added in API 24 if your target API or SDK platform is lower than that version that resource identifier will not be recognized.

Share this post


Link to post

How does the IDE find the SDK version?

 

I've got the Android SDK from google directly and there are folders for different SDK versions (23, 24, ...) depending on the installation.

 

When I create a new SDK manager and point to say version 23, the IDE reads the version as 26.1.1.32

 

 

Share this post


Link to post
7 hours ago, John Kouraklis said:

How does the IDE find the SDK version?

 

I've got the Android SDK from google directly and there are folders for different SDK versions (23, 24, ...) depending on the installation.

 

When I create a new SDK manager and point to say version 23, the IDE reads the version as 26.1.1.32

That value 26.1.1 seems to be hard coded somewhere and is basically meaningless. What you need to do is go to SDK Manager, and under SDK choose appropriate platform folder:

 

SDK API level location

C:\.....\sdk\platforms\android-28

  • Like 1

Share this post


Link to post
4 hours ago, Dalija Prasnikar said:

SDK API level location

C:\.....\sdk\platforms\android-28

That's what I have pointing to android-23

 

But the compiler adds the resizableActivity, which means it detects a version higher than 23. 

 

All the other folders expect the SDK API point to the latest tools (eg. adb, aapt, etc.) 

Share this post


Link to post
41 minutes ago, John Kouraklis said:

That's what I have pointing to android-23

 

You need at least 24

 

41 minutes ago, John Kouraklis said:

But the compiler adds the resizableActivity, which means it detects a version higher than 23. 

Nobody is detecting anything. Delphi IDE adds that automatically because you need to target at least API 26 (now 28) and Delphi does not support resizeableActivity (AFAIK) so it must explicitly set it to False. Default value if it is not explicitly set is True.

Why it adds it after you save project and not before, that is another story.

  • Thanks 1

Share this post


Link to post
14 hours ago, John Kouraklis said:

The wizard that adds a SDK must look up some values because it generates a version for the SDK

 

It's logic is mystery to me... it always chooses 26.1.1 for me and I have platforms from 19-28 installed. Why it picks 26 instead of 28?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×