Failed to install debug apk on device, invalid apk

Hi, I’m trying to test my app on android device but it fails to be installed.

Doing this in FlashDevelop I get:

C:\Users\User\Documents\Trivia\bin\android\debug/bin/app/build/outputs/apk/trivia-debug.apk: 1 file pushed. 4.2 MB/s (31042881 bytes in 7.023s)
pkg: /data/local/tmp/trivia-debug.apk
Failure [INSTALL_FAILED_INVALID_APK]
Starting: Intent { act=android.intent.action.MAIN cmp=trivia/.MainActivity }
Error type 3
Error: Activity class {trivia/trivia.MainActivity} does not exist.
*:E lime:D Lime:D Main:D GameActivity:D SDLActivity:D GLThread:D trace:D Haxe:D

my project.xml:

<?xml version="1.0" encoding="utf-8"?>
<!-- metadata, make sure 'package' is at least 3 segments (ie. com.mycompany.myproject) -->
<meta title="trivia" package="trivia" version="1.0.0" company="kpded" />

<!-- output -->
<app main="Main" file="trivia" path="bin" />

<template
	path="assets/templates/AndroidManifest.xml"
	rename="AndroidManifest.xml"
	if="android"
/>

<window background="#ffffff" fps="30" />
<window width="1000" height="1000" unless="mobile" />
<window orientation="landscape" vsync="false" antialiasing="0" if="cpp" />

<!-- classpath, haxe libs -->
<source path="src" />
<haxelib name="openfl" />
<haxelib name="actuate" />
<haxelib name="stablexui" />
<haxelib name="random" />

<!-- assets -->
<icon path="assets/openfl.svg" />
<assets path="assets/img" rename="img" />
<assets path="assets/fonts" rename="fonts" />

<!-- optimize output
<haxeflag name="-dce full" /> -->

What could be wrong with the apk and how could I fix this?

Try changing your package to something else (e.g. com.kded.trivia :) )

Try changing your package to something else (e.g. com.kded.trivia :slight_smile: )

Thanks a lot!

I can’t believe I so dumb to miss this)

Now it says

Failure [INSTALL_FAILED_CONTAINER_ERROR]

I’ve already checked a few neighbor threads on this topic, but setting android:installLocation to “auto” doesn’t work.

Are there any other options to solve this?

Maybe try installing your apk manually? Copy it to your device and run it via some kind of file explorer?

Also, try deleting the application off the device if another copy already exists?

After I increased free space in device memory to 600 MB manual installation worked (with previous apk deleted).

Installation form within the FlashDevelop still fails due to container error.

Thank you for help!