Jump to content
kobygold

Android Invalid APK

Recommended Posts

Hi guys,

I have a game I wrote at Delphi 10.4 about 2 years ago, and to update it to Android 14 I've installed latest Delphi 12.1 (+patch 1).

I had a few issues building my old project, but managed to overcome those (installed Android SDK+NDK by running the Delphi Installer as Admin, as mentioned on another thread).

I've also deleted the content of my Android folder, and deleted the AndroidManifest.xml and AndroidManifest.template.xml files, and built the project again.

But I still get the error below when trying to deploy directly from Delphi (with adb), and when copying the APK to my phone and trying to install it manually (after uninstalling the previous version), I'm getting the error: "App not installed as package appears to be invalid".

BTW, when installing manually I get a popup asking to scan my APK, and once I approve the scan is passing correctly, but the installation fails on the error above.

BTW, following the hints on Delphi help page, I tried setting it to use "clean install every time" with the "-cleaninstall" in the Parameters field of the Run >Parameters dialog. But that didn't change any thing

 

image.thumb.png.3e5f72ab418e35eb5f1082bcd637d1ce.png

 

image.png.f847411a5a636ef1a5a9e59de94bfe36.png

 

Any idea what's missing?

 

Thanks,

Koby

 

Share this post


Link to post

Does your phone have other apps installed that were made with earlier Delphi versions? Maybe you could try to uninstall all of them and see what happens.

Share this post


Link to post
On 8/4/2024 at 9:11 PM, kobygold said:

Any idea what's missing?

I expect your install of Delphi 12.1 is misconfigured. Try creating a blank app and deploy it to a device.

Share this post


Link to post

Hi guys,

Sorry for the late response, I was on a trip abroad.

I tried creating a simple Hello World app and it didn't work, so uninstalled & re-installed the Android tools (from Tools > Manage Features) running as Admin,
and uninstalled other apps I created, and then it worked!

Thanks!

 

  • Like 1

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

×