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.76k stars 867 forks source link

[BUG]: Task :app:checkDebugAarMetadata FAILED #292

Closed mamadfar closed 2 years ago

mamadfar commented 2 years ago

react-native environment setup

Description

Hello guys, When I try to yarn android or npm run android I get error below: Capture Also I didn't change anything in the boilerplate, just ran the app ! and one more thing, I found this amazing template just 2 hours ago :), so I use last version of this template and this is my package.json package.json.txt

Version

3.3.0

On which OS this issue appear on?

Desktop OS

Windows 10

JeremyDolle commented 2 years ago

Can you try to open the project with Android Studio and build it to see if there is any errors please. After that If it's not failing, retry yarn android.

Waiting for your reply

mamadfar commented 2 years ago

Can you try to open the project with Android Studio and build it to see if there is any errors please. After that If it's not failing, retry yarn android.

Waiting for your reply

I did what you said but I got same error on Android studio and webstorm with with Android API 30 & 31

JeremyDolle commented 2 years ago

Ok lets check some configuration.

  1. What do you have in the gradle-wrapper.properties ?
  2. What do you have after a java -version cmd ?

And mabye it could help: run cd android && ./gradlew clean and try to build again :)

mamadfar commented 2 years ago
  1. answer :) distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists

  2. answer :) java version "18.0.1" 2022-04-19 Java(TM) SE Runtime Environment (build 18.0.1+10-24) Java HotSpot(TM) 64-Bit Server VM (build 18.0.1+10-24, mixed mode, sharing)

everytime, before build, I run cd android && ./gradlew clean

JeremyDolle commented 2 years ago

Ok 🫤 did you install your Java SE Development Kit (JDK)with the following cmd like in the documentation ?

choco install -y openjdk11
mamadfar commented 2 years ago

Yes I did it again but it didn't work. after removing .gradle folder and rename d8.bat and d8.jar to dx.bat and dx.jar in sdk 31, everything goes ok but after build, I get a white screen without any elements in my phone or emulator and without error. please help me 😢, I got tired !

mamadfar commented 2 years ago

Yes I did it again but it didn't work. after removing .gradle folder and change d8.bat and d8.jar to dx.bat and dx.jar in sdk 31, everything goes ok but after build, I get a white screen without any elements in my phone or emulator and without error. please help me 😢, I got tired !

I solved it ! just with remove again .gradle folder and run ./gradelw clean in ./android 😑😐

JeremyDolle commented 2 years ago

This was really hard to find your solution ! Very happy to see that you finally solve your environment!

I would have like to help you more and quicker!

Btw enjoy the boilerplate! ⭐️