Build fails when specifying "icon" in app.json

Hi, I’m trying to build my android app (expo build:android), but if I add “icon” in app.json, build fails with the following message:

/app/workingdir/android/sdk31/android-shell-app/app/src/main/res/mipmap-mdpi/ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
/app/workingdir/android/sdk31/android-shell-app/app/src/main/res/mipmap-xhdpi/ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
/app/workingdir/android/sdk31/android-shell-app/app/src/main/res/mipmap-hdpi/ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
/app/workingdir/android/sdk31/android-shell-app/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
/app/workingdir/android/sdk31/android-shell-app/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
:app:mergeProdMinSdkProdKernelReleaseResources FAILED
[stderr] warning: Attempt to recreate a file for type com.raizlabs.android.dbflow.config.ExponentKernel$Database
[stderr] warning: Attempt to recreate a file for type com.raizlabs.android.dbflow.config.ExponentKernel$Database
[stderr] warning: File for type 'com.raizlabs.android.dbflow.config.GeneratedDatabaseHolder' created in the last round will not be subject to annotation processing.
[stderr] Note: Some input files use or override a deprecated API.
[stderr] Note: Recompile with -Xlint:deprecation for details.
[stderr] Note: Some input files use unchecked or unsafe operations.
[stderr] Note: Recompile with -Xlint:unchecked for details.
[stderr] 3 warnings
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:mergeProdMinSdkProdKernelReleaseResources'.
[stderr] > Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
[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 6m 14s
690 actionable tasks: 690 executed
Error: Process exited with non-zero code: 1
    at ChildProcess.child.on (/app/node_modules/@expo/spawn-async/build/spawnAsync.js:39:21)
    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)

My app.json:

{
  "expo": {
    "name": "myapp",
    "icon": "./assets/images/icon2.png",
    "scheme": "myapp",
    "version": "1.0.0",
    "slug": "myapp",
    "sdkVersion": "31.0.0",
    "ios": {
      "bundleIdentifier": "com.myapp.myapp"
    },
    "android": {
      "package": "com.myapp.myapp",
      "googleServicesFile": "./google-services.json"
    }
  }
}

package.json

{
  "name": "myapp",
  "main": "node_modules/expo/AppEntry.js",
  "private": true,
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "eject": "expo eject",
    "test": "node ./node_modules/jest/bin/jest.js --watchAll"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/samples": "2.1.1",
    "@expo/vector-icons": "github:expo/vector-icons",
    "@expo/videoplayer": "^0.4.0",
    "adm-zip": "^0.4.13",
    "axios": "^0.18.0",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "expo": "^31.0.6",
    "mobx": "^5.9.0",
    "mobx-react": "^5.4.3",
    "native-base": "^2.10.0",
    "plist": "^3.0.1",
    "react": "^16.6.3",
    "react-native": "^0.57.7",
    "react-native-keyboard-aware-scroll-view": "^0.8.0",
    "react-native-lightbox": "^0.8.0",
    "react-native-render-html": "^3.10.0",
    "react-native-status-bar-height": "^2.2.0",
    "react-native-video": "^4.3.1",
    "react-native-vkontakte-login": "^0.3.22",
    "react-navigation": "^2.18.2",
    "stripe-client": "^1.1.5",
    "xcode": "^1.1.0"
  },
  "devDependencies": {
    "babel-plugin-transform-decorators-legacy": "^1.3.5",
    "babel-preset-expo": "^5.0.0",
    "babel-preset-mobx": "^2.0.0",
    "jest-expo": "^31.0.0"
  }
}

P.S. Icon is a 1024x1024 .png file

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