Android build fails on `Task :unimodules-permissions-interface:compileReleaseKotli`

Hi,
I tried multiple times to build my project using Expo but I’m getting this error every time:

> Task :unimodules-permissions-interface:compileReleaseKotlin
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:mergeReleaseResources'.
[stderr] > Multiple task action failures occurred:
[stderr]    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
[stderr]       > Android resource compilation failed
[stderr]         /app/turtle/workingdir/android/sdk36/android-shell-app/app/src/main/res/mipmap-xhdpi/ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.
[stderr]             
[stderr]         /app/turtle/workingdir/android/sdk36/android-shell-app/app/src/main/res/mipmap-xhdpi/ic_launcher.png: AAPT: error: file failed to compile.
[stderr]             
[stderr]    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
[stderr]       > Android resource compilation failed
[stderr]         /app/turtle/workingdir/android/sdk36/android-shell-app/app/src/main/res/drawable-xxxhdpi/shell_launch_background_image.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.
[stderr]             
[stderr]         /app/turtle/workingdir/android/sdk36/android-shell-app/app/src/main/res/drawable-xxxhdpi/shell_launch_background_image.png: AAPT: error: file failed to compile.
[stderr]             
[stderr]    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
[stderr]       > Android resource compilation failed
[stderr]         /app/turtle/workingdir/android/sdk36/android-shell-app/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.
[stderr]             
[stderr]         /app/turtle/workingdir/android/sdk36/android-shell-app/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: AAPT: error: file failed to compile.
[stderr]             
[stderr]    > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
[stderr]       > Android resource compilation failed
[stderr]         /app/turtle/workingdir/android/sdk36/android-shell-app/app/src/main/res/mipmap-mdpi/ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.
[stderr]             
[stderr]         /app/turtle/workingdir/android/sdk36/android-shell-app/app/src/main/res/mipmap-mdpi/ic_launcher.png: AAPT: error: file failed to compile.
[stderr]             
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 2m 0s
304 actionable tasks: 304 executed
Error: ./gradlew exited with non-zero code: 1
    at ChildProcess.completionListener (/app/turtle/node_modules/@expo/xdl/node_modules/@expo/spawn-async/build/spawnAsync.js:52:23)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:915:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
    ...
    at spawnAsync (/app/turtle/node_modules/@expo/xdl/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)
    at spawnAsyncThrowError (/app/turtle/node_modules/@expo/xdl/build/detach/ExponentTools.js:235:45)
    at buildShellAppAsync (/app/turtle/node_modules/@expo/xdl/build/detach/AndroidShellApp.js:881:11)
    at <anonymous>

Here is my buiild. I’m running expo build:android --public-url https://app.zigo.app/android-index.json as well.

You need to host entire directory, currently your manifest is hosted correctly, but if go to any asset It’s redirecting to main page e.g. https://app.zigo.app/assets/f9b910333207687a98c2733cd604c3e2

Thanks @wkozyra, that was the problem.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.