Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Error

A topic by Ryhzx67 created 16 days ago Views: 130 Replies: 15
Viewing posts 1 to 2

Hi, Anaryx. I’ve been having this problem over and over again. I’ve followed the instructions and also tried to find a solution using AI. Please help 🙏

Developer

Hello friends, this error is caused by AG APK Builder failing to create an adaptive icon. To solve this, try opening the AG-APK-Builder-win32-x64\resources\base_module\app\src\main\res\mipmap-xxxhdpi folder. There, you'll find ic_launcher_foreground.png. Copy it to the folder:

1.mipmap-hdpi

2.mipmap-mdpi

3.mipmap-xhdpi

4.mipmap-xxhdpi

After copying it, restart AG APK Builder by closing and reopening it, and try building again. If the error persists, please send a screenshot. Thank you.

It works. But now, this is happen 🙏

Developer

Could you please click View Log and scroll up a little? The current screenshot only shows the summary (Resource compilation failed). The actual file causing the error is usually shown a few lines above.

Please send a screenshot of the log from about 20–30 lines above the error or copy the full build log. That will tell me exactly which resource is failing.

Ouch, sorry. My bad.

[18:17:59] Building APK...

[18:17:59] PAD: OFF | minSdk: 21 | targetSdk: 36 | Orient: landscape

[18:17:59] Output: Documents/AG APK BUILDER (default)

[18:17:59] [AdMob] Disabled — build tanpa monetisasi

[18:17:59] [AGNotification] Disabled — build tanpa notifikasi

[18:17:59] [AGJoystick] Disabled — build tanpa virtual joystick

[18:17:59] [Java] Using: D:\AG-APK-Builder-v1-4\resources\jre

[18:17:59] [AdMob] Toggle disabled — AdMob is not used.

[18:17:59] [AGNotification] Toggle nonaktif — Notification tidak digunakan.

[18:17:59] [AGJoystick] Toggle nonaktif — Joystick tidak digunakan.

[18:17:59] [AGPay] AGPay.js tidak ditemukan — AGPay nonaktif.

[18:17:59] [Build] AdMob : disabled

[18:17:59] [Build] Notif : disabled

[18:17:59] [Build] Joystick : disabled

[18:17:59] [Build] AGPay : disabled

[18:17:59] [Build] PAD : disabled

[18:17:59] [Build] Orient. : landscape

[18:17:59] Preparing environment... (AGP 8.3.2)

[18:18:00] [Gradle] wrapper → gradle-8.7-bin.zip (absolute file:///)

[18:18:00] [AGP] Memeriksa AGP & Kotlin plugin cache...

[18:18:00] OK gradle (cached)

[18:18:00] OK gradle-api (cached)

[18:18:00] OK builder (cached)

[18:18:00] OK builder-model (cached)

[18:18:00] [AGP] Downloading com.android.application.gradle.plugin:8.3.2...

[18:18:00] Downloading com.android.application.gradle.plugin:8.3.2...

[18:18:00] OK com.android.application.gradle.plugin-8.3.2.pom

[18:18:00] [AGP] Downloading org.jetbrains.kotlin.android.gradle.plugin:1.9.22...

[18:18:00] Downloading org.jetbrains.kotlin.android.gradle.plugin:1.9.22...

[18:18:02] OK org.jetbrains.kotlin.android.gradle.plugin-1.9.22.pom

[18:18:02] OK kotlin-gradle-plugin (cached)

[18:18:02] [AGP] Semua plugin siap. Build akan jalan offline.

[18:18:02] Injecting www...

[18:18:02] [Java] MainActivity.java written (Standard)

[18:18:04] Updating strings.xml...

[18:18:04] Patching manifest...

[18:18:04] [Orientation] screenOrientation set to: landscape

[18:18:04] Processing icons...

[18:18:04] Updating Gradle...

[18:18:04] [Gradle] compileSdk=35, targetSdk=35

[18:18:04] Running Gradle bundleRelease...

[18:18:06] To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.7/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.

[18:18:09] Daemon will be stopped at the end of the build

[18:18:33] > Task :app:preBuild UP-TO-DATE > Task :app:preReleaseBuild UP-TO-DATE

[18:18:33] > Task :app:generateReleaseResValues

[18:18:34] > Task :app:mapReleaseSourceSetPaths

[18:18:34] > Task :app:generateReleaseResources

[18:18:38] > Task :app:mergeReleaseResources

[18:18:38] D:\AG-APK-Builder-v1-4\resources\tools\gradle-home\caches\transforms-4\bdd80407bb5faa70684d863d17217a62\transformed\material-1.12.0\res\values\values.xml:1287:4: Failed to flatten XML for resource 'app_name' with error: Invalid unicode escape sequence in string "{str}" D:\AG-APK-Builder-v1-4\resources\tools\gradle-home\caches\transforms-4\bdd80407bb5faa70684d863d17217a62\transformed\material-1.12.0\res\values\values.xml:1287:4: string/app_name does not contain a valid string resource.

[18:18:38] Omitting file D:\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xxxhdpi\ic_launcher.png because it is hidden.

[18:18:39] Omitting file D:\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xxxhdpi\ic_launcher_foreground.png because it is hidden.

[18:18:39] Omitting file D:\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-mdpi\ic_launcher.png because it is hidden. Omitting file D:\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xxhdpi\ic_launcher_round.png because it is hidden. Omitting file D:\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xxhdpi\ic_launcher.png because it is hidden. Omitting file D:\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xhdpi\ic_launcher.png because it is hidden. Omitting file D:\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-mdpi\ic_launcher_round.png because it is hidden.

[18:18:39] Omitting file D:\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xhdpi\ic_launcher_round.png because it is hidden. > Task :app:createReleaseCompatibleScreenManifests > Task :app:extractDeepLinksRelease

[18:18:40] > Task :app:processReleaseMainManifest

[18:18:40] > Task :app:processReleaseManifest

[18:18:40] > Task :app:processApplicationManifestReleaseForBundle

[18:18:40] > Task :app:checkReleaseAarMetadata

[18:18:40] > Task :app:packageReleaseResources

[18:18:41] > Task :app:mergeReleaseResources Omitting file D:\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-hdpi\ic_launcher_round.png because it is hidden. Omitting file D:\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-hdpi\ic_launcher.png because it is hidden.

[18:18:41] Omitting file D:\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xxxhdpi\ic_launcher_round.png because it is hidden.

[18:18:41] > Task :app:parseReleaseLocalResources

[18:18:41] > Task :app:mergeReleaseResources FAILED

[18:18:41] > Task :app:extractReleaseVersionControlInfo > Task :app:processReleaseManifestForPackage

[18:18:42] FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:mergeReleaseResources'. > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable >

[18:18:42] Resource compilation failed (Failed to compile values resource file D:\AG-APK-Builder-v1-4\resources\base_module\app\build\intermediates\incremental\release\mergeReleaseResources\merged.dir\values\values.xml. Cause: java.lang.IllegalStateException: Can not extract resource from com.android.aaptcompiler.ParsedResource@5fdc1989.). Check logs for more details. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. BUILD FAILED in 36s

[18:18:42] 14 actionable tasks: 14 executed

[18:18:42] [ERROR] CMD FAILED exit code 1

[18:18:43] [ERROR] Build failed: Error invoking remote method 'build-apk': Error: CMD FAILED exit code 1

Developer

Thank you for the log. The error has changed, which means the previous missing ic_launcher_foreground issue is no longer the main problem.

The current error indicates that Android failed while compiling the app resources. I also noticed that several icon files are being skipped because they are detected as hidden, and there is also an error related to the app_name string resource. Either of these can cause the build to fail.

To identify the exact cause, could you please send me:

The exact App Name you entered in AG APK Builder.

The contents of the file: resources/base_module/app/src/main/res/values/strings.xml

With those, I can determine exactly which resource is causing the compilation failure and help you resolve it.

Thanks for your reply. I’ve successfully created my first Android port 😁 . But why is the game’s screen size so small?

Developer

with pleasure, that's because the size in the game is probably still 512x512 I suggest changing the game size in the rpg maker to 1280x720, but sometimes there is still a little black on the edges but, for now maybe that's all I can help with the screen size, because ag apk builder doesn't have an automatic full screen feature yet, for the next update I will add the full screen feature in ag apk builder v2.0

Developer

if you want fullscreen try using the visustella core plugin

Hello again, Anaryx 😁 . I'm having another problem—please help 🙏

[17:04:53] Building APK...

[17:04:53] PAD: OFF | minSdk: 21 | targetSdk: 36 | Orient: landscape

[17:04:53] Output: Documents/AG APK BUILDER (default)

[17:04:53] [AdMob] Disabled — build tanpa monetisasi

[17:04:53] [AGNotification] Disabled — build tanpa notifikasi

[17:04:53] [AGJoystick] Disabled — build tanpa virtual joystick

[17:04:53] [Java] Using: C:\Users\HELLO\Downloads\AG-APK-Builder-v1-4\resources\jre

[17:04:53] [AdMob] Toggle disabled — AdMob is not used.

[17:04:53] [AGNotification] Toggle nonaktif — Notification tidak digunakan.

[17:04:53] [AGJoystick] Toggle nonaktif — Joystick tidak digunakan.

[17:04:53] [AGPay] AGPay.js tidak ditemukan — AGPay nonaktif.

[17:04:53] [Build] AdMob : disabled

[17:04:53] [Build] Notif : disabled

[17:04:53] [Build] Joystick : disabled

[17:04:53] [Build] AGPay : disabled

[17:04:53] [Build] PAD : disabled

[17:04:53] [Build] Orient. : landscape

[17:04:53] Preparing environment... (AGP 8.3.2)

[17:04:53] [Gradle] wrapper → gradle-8.7-bin.zip (absolute file:///)

[17:04:53] [AGP] Memeriksa AGP & Kotlin plugin cache...

[17:04:53] OK gradle (cached)

[17:04:53] OK gradle-api (cached)

[17:04:53] OK builder (cached)

[17:04:53] OK builder-model (cached)

[17:04:53] OK com.android.application.gradle.plugin (cached)

[17:04:53] OK org.jetbrains.kotlin.android.gradle.plugin (cached)

[17:04:53] OK kotlin-gradle-plugin (cached)

[17:04:53] [AGP] Semua plugin siap. Build akan jalan offline.

[17:04:53] Injecting www...

[17:04:53] [Java] MainActivity.java written (Standard)

[17:05:29] Updating strings.xml...

[17:05:29] Patching manifest...

[17:05:29] [Orientation] screenOrientation set to: landscape

[17:05:29] Processing icons...

[17:05:29] Updating Gradle...

[17:05:29] [Gradle] compileSdk=35, targetSdk=35

[17:05:29] Running Gradle bundleRelease...

[17:05:41] To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.7/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.

[17:05:52] Daemon will be stopped at the end of the build

[17:06:21] > Task :app:preBuild UP-TO-DATE > Task :app:preReleaseBuild UP-TO-DATE

[17:06:21] > Task :app:generateReleaseResValues

[17:06:23] > Task :app:mapReleaseSourceSetPaths > Task :app:generateReleaseResources

[17:06:30] > Task :app:mergeReleaseResources

[17:06:30] Omitting file C:\Users\HELLO\Downloads\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xxxhdpi\ic_launcher.png because it is hidden.

[17:06:30] Omitting file C:\Users\HELLO\Downloads\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-mdpi\ic_launcher_round.png because it is hidden.

[17:06:30] Omitting file C:\Users\HELLO\Downloads\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xxxhdpi\ic_launcher_foreground.png because it is hidden. Omitting file C:\Users\HELLO\Downloads\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xhdpi\ic_launcher.png because it is hidden. Omitting file C:\Users\HELLO\Downloads\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-hdpi\ic_launcher_round.png because it is hidden. Omitting file C:\Users\HELLO\Downloads\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-hdpi\ic_launcher.png because it is hidden.

[17:06:30] Omitting file C:\Users\HELLO\Downloads\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-mdpi\ic_launcher.png because it is hidden. Omitting file C:\Users\HELLO\Downloads\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xxhdpi\ic_launcher_round.png because it is hidden. Omitting file C:\Users\HELLO\Downloads\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xhdpi\ic_launcher_round.png because it is hidden. Omitting file C:\Users\HELLO\Downloads\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xxhdpi\ic_launcher.png because it is hidden.

[17:06:30] > Task :app:createReleaseCompatibleScreenManifests > Task :app:extractDeepLinksRelease

[17:06:32] > Task :app:processReleaseMainManifest

[17:06:32] > Task :app:processReleaseManifest > Task :app:processApplicationManifestReleaseForBundle

[17:06:32] > Task :app:mergeReleaseResources Omitting file C:\Users\HELLO\Downloads\AG-APK-Builder-v1-4\resources\base_module\app\src\main\res\mipmap-xxxhdpi\ic_launcher_round.png because it is hidden.

[17:06:32] > Task :app:checkReleaseAarMetadata

[17:06:32] > Task :app:packageReleaseResources

[17:06:33] > Task :app:parseReleaseLocalResources > Task :app:extractReleaseVersionControlInfo > Task :app:mergeReleaseShaders

[17:06:33] > Task :app:compileReleaseShaders NO-SOURCE > Task :app:generateReleaseAssets UP-TO-DATE

[17:07:02] > Task :app:processReleaseManifestForPackage

[17:07:03] > Task :app:mergeReleaseAssets

[17:11:05] > Task :app:buildKotlinToolingMetadata

[17:11:06] > Task :app:checkKotlinGradlePluginConfigurationErrors

[17:11:06] > Task :app:javaPreCompileRelease

[17:11:06] > Task :app:extractProguardFiles

[17:11:06] > Task :app:mergeReleaseJniLibFolders

[17:11:06] > Task :app:mergeReleaseArtProfile > Task :app:mergeReleaseNativeLibs NO-SOURCE > Task :app:stripReleaseDebugSymbols NO-SOURCE > Task :app:writeReleaseAppMetadata

[17:11:07] > Task :app:checkReleaseDuplicateClasses

[17:11:08] > Task :app:collectReleaseDependencies

[17:11:08] > Task :app:configureReleaseDependencies > Task :app:extractReleaseNativeSymbolTables NO-SOURCE > Task :app:parseReleaseIntegrityConfig UP-TO-DATE > Task :app:validateSigningRelease

[17:11:12] > Task :app:processReleaseResources

[17:11:12] > Task :app:compileReleaseKotlin NO-SOURCE

[17:11:13] > Task :app:bundleReleaseResources

[17:11:15] > Task :app:compileReleaseJavaWithJavac

[17:11:15] Note: C:\Users\HELLO\Downloads\AG-APK-Builder-v1-4\resources\base_module\app\src\main\java\com\hazunee\holdinghandsid\MainActivity.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

[17:11:16] > Task :app:mergeReleaseGeneratedProguardFiles UP-TO-DATE

[17:11:16] > Task :app:processReleaseJavaRes

[17:11:19] > Task :app:expandReleaseArtProfileWildcards

[17:11:24] > Task :app:mergeReleaseJavaResource

[17:11:54] > Task :app:minifyReleaseWithR8

[17:12:25] > Task :app:buildReleasePreBundle

[17:12:25] > Task :app:compileReleaseArtProfile

[17:12:41] > Task :app:packageReleaseBundle

[17:12:51] > Task :app:signReleaseBundle FAILED

[17:12:52] FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:signReleaseBundle'. > A failure occurred while executing com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable * Try:

[17:12:52] > Run with --stacktrace option to get the stack trace.

[17:12:52] 40 actionable tasks: 38 executed, 2 up-to-date

[17:12:52] > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. BUILD FAILED in 7m 21s

[17:12:53] FAILURE: Build failed with an exception. * What went wrong: Java heap space * Try: > Run with --stacktrace option to get the stack trace.

[17:12:53] > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. BUILD FAILED in 7m 22s

[17:12:53] [ERROR] CMD FAILED exit code 1

[17:13:00] [ERROR] Build failed: Error invoking remote method 'build-apk': Error: CMD FAILED exit code 1

Developer

Hello again. This error occurs because your PC is running out of RAM during the build process. If you have more than 8GB of RAM, you can download the JVM fix file and adjust the 8GB setting to match your PC's specifications. If your PC has 8GB of RAM or less, you should close some applications to allow the APK build to proceed without interruption.