thecodingmachine / react-native-boilerplate

A React Native template for building solid applications šŸ™, using JavaScript šŸ’› or Typescript šŸ’™ (you choose).
https://thecodingmachine.github.io/react-native-boilerplate/
MIT License
4.75k stars 864 forks source link

[BUG]: Unable to install Android app after creation of the project #339

Closed imAunAbbas closed 1 year ago

imAunAbbas commented 1 year ago

react-native environment setup

Description

I've recently installed the latest version of this boilerplate for my new project. After the installation, iOS application is working fine, but Android application is not installing on the emulator. I've checked my development environment as well, as my other projects (including the new one) are working. When I try to run the project on Android, it gives the following error:

`The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build. This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if the versions are equal. Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects. If the parent project does not need the plugin, add 'apply false' to the plugin line. See: https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl The Kotlin plugin was loaded in the following projects: ':react-native-gesture-handler', ':react-native-screens'

Task :app:processDebugResources FAILED 106 actionable tasks: 10 executed, 96 up-to-date

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

2: Task failed with an exception.

BUILD FAILED in 13s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

2: Task failed with an exception.

BUILD FAILED in 13s

at makeError (/Users/<Name>/Desktop/repo/Project/node_modules/execa/index.js:174:9)
at /Users/<Name>/Desktop/repo/Project/node_modules/execa/index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (/Users/<Name>/Desktop/repo/Project/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:82:7)
at async Command.handleAction (/Users/<Name>/Desktop/repo/Project/node_modules/@react-native-community/cli/build/index.js:108:9)

info Run CLI with --verbose flag for more details. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`

Version

3.6.4

On which OS this issue appear on?

Desktop OS

macOS Ventura 13.2

JeremyDolle commented 1 year ago

Hi @imAunAbbas

I am on it ! If you want to fix it quickly remove the following in the AndroidManifest file :

<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
      <background android:drawable="@color/ic_launcher_background" />
      <foreground android:drawable="@mipmap/ic_launcher_foreground" />
    </adaptive-icon>

Sorry for that it will be fixed in the next release

imAunAbbas commented 1 year ago

Hi @JeremyDolle

Thank you for the quick response. Can you please tell me how much time will it take for the next release?

JeremyDolle commented 1 year ago

Sorry but I don't know the exact date of the release now because there is also a graphic overhaul in progress and the fix is planned on the same sprint.

Hope the next week or the next after we can provide a release of all the in progress work

JeremyDolle commented 1 year ago

Fixed in v3.6.5. Enjoy !