Error in the build apk

Hello, I tried make the build of my app with this command:

expo build:android -t apk

and happened this error in the log:

Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
> Task :app:preBuild UP-TO-DATE
> Task :app:extractProguardFiles
> Task :app:preReleaseBuild
> Task :app:compileReleaseAidl NO-SOURCE
> Task :app:checkReleaseManifest
> Task :app:compileReleaseRenderscript NO-SOURCE
> Task :app:generateReleaseBuildConfig
> Task :app:javaPreCompileRelease
> Task :app:mainApkListPersistenceRelease
> Task :app:mergeReleaseShaders
> Task :app:compileReleaseShaders
> Task :app:generateReleaseAssets
> Task :app:mergeReleaseAssets
> Task :app:processReleaseGoogleServices
Parsing json file: /app/turtle/workingdir/android/sdk37/android-shell-app/app/google-services.json
> Task :app:createReleaseCompatibleScreenManifests
> Task :app:processReleaseManifest
/app/turtle/workingdir/android/sdk37/android-shell-app/app/src/main/AndroidManifest.xml:18:9-27:20 Warning:
	provider#expo.modules.filesystem.FileSystemFileProvider@android:authorities was tagged at AndroidManifest.xml:18 to replace other declarations but no other declaration present
> Task :app:fabricGenerateResourcesRelease
> Task :app:generateReleaseResValues
> Task :app:generateReleaseResources
> Task :app:mergeReleaseResources FAILED
[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/sdk37/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/sdk37/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/sdk37/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/sdk37/android-shell-app/app/src/main/res/mipmap-mdpi/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/sdk37/android-shell-app/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.
[stderr]             
[stderr]         /app/turtle/workingdir/android/sdk37/android-shell-app/app/src/main/res/mipmap-xxxhdpi/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/sdk37/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/sdk37/android-shell-app/app/src/main/res/drawable-xxxhdpi/shell_launch_background_image.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 52s
14 actionable tasks: 14 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:418:26)
    at ChildProcess.emit (events.js:311:20)
    at ChildProcess.EventEmitter.emit (domain.js:482:12)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286: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:190:45)
    at buildShellAppAsync (/app/turtle/node_modules/@expo/xdl/build/detach/AndroidShellApp.js:891:11)
    at async Object.createAndroidShellAppAsync (/app/turtle/node_modules/@expo/xdl/build/detach/AndroidShellApp.js:385:5)
    at async runShellAppBuilder (/app/turtle/build/builders/android.js:83:9)
    at async Object.buildAndroid [as android] (/app/turtle/build/builders/android.js:31:28)
    at async build (/app/turtle/build/jobManager.js:158:24)
    at async processJob (/app/turtle/build/jobManager.js:103:32)
    at async Object.doJob (/app/turtle/build/jobManager.js:35:5)
    at async main (/app/turtle/build/server.js:44:13)

the ‘expo diagnostics’ result:

Expo CLI 3.20.1 environment info:
    System:
      OS: Windows 10 10.0.18363
    Binaries:
      Node: 12.16.1 - C:\Program Files\nodejs\node.EXE
      npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD
    IDEs:
      Android Studio: Version  3.6.0.0 AI-192.7142.36.36.6392135
    npmPackages:
      expo: ~37.0.3 => 37.0.8
      react: ~16.9.0 => 16.9.0
      react-dom: ~16.9.0 => 16.9.0
      react-native: https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz => 0.61.4
      react-native-web: ~0.11.7 => 0.11.7
      react-navigation: 4.0.10 => 4.0.10

Please, help me.

1 Like

Hey @manbomb,

The error logs seem to indicate that the files you provided for the app icon and splash screen are not .png files. Can you make sure that you’ve provided .png files for those values in your app.json and that they aren’t a different file extension that have been renamed?

Cheers,
Adam

2 Likes

Thanks @adamjnav, I’m checking this now. Thank you very much.

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