Skip to content

Android - ./gradlew bundleRelease not including ic_launcher_round from settings #26313

Closed
@TimothyDLewis

Description

@TimothyDLewis

On latest major version of react-native, ./gradlew bundleRelease followed by react-native run-android --variant=release results in an .apk file with default Android icon for ic_launcher_round (newer version of Android on installed device)

Can confirm that icons are included correctly:

Screenshot 2019-09-03 15 45 13

And referenced in AndroidManifest.xml:

<application
    android:roundIcon="@mipmap/ic_launcher_round"
    android:icon="@mipmap/ic_launcher"
>
</application>

Running in debug mode via react-native run-android results in the correct icon being displayed on device after installation, but bundling/installing in release mode shows default android icon.

React Native version:

System:
    OS: macOS 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 1.38 GB / 16.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 8.3.0 - ~/.nvm/versions/node/v8.3.0/bin/node
    Yarn: 1.3.2 - ~/.nvm/versions/node/v8.3.0/bin/yarn
    npm: 5.3.0 - ~/.nvm/versions/node/v8.3.0/bin/npm
    Watchman: 4.7.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
    Android SDK:
      API Levels: 23, 24, 25, 26, 27, 28, 29
      Build Tools: 23.0.1, 26.0.1, 26.0.2, 27.0.1, 27.0.3, 28.0.3, 29.0.2
      System Images: android-28 | Intel x86 Atom_64
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5791312
    Xcode: 10.3/10G8 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.5 => 0.60.5

Steps To Reproduce

  1. react-native init ...
  2. Add icons (ic_launcher.png and ic_launcher_round.png) to src\main\res\mipmap-{size}dpi
  3. Clean build via cd android && ./gradlew clean
  4. Bundle Android .aab in release mode via ./gradlew bundleRelease
  5. Install .apk on device via cd .. && react-native run-android --variant=release

Intended Outcome

App is installed on device and custom icon is displayed.

Actual Outcome

App is installed on device, but default android icon is displayed.

Additional information can be found on open question on StackOverflow:

https://stackoverflow.com/questions/57775250/react-native-0-60-ic-launcher-round-missing-for-release-bundle-build

Metadata

Metadata

Assignees

No one assigned

    Labels

    API: SettingsBugPlatform: AndroidAndroid applications.StaleThere has been a lack of activity on this issue and it may be closed soon.Tech: Bundler 📦This issue is related to the bundler (Metro, Haul, etc) used.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions