1

When running "npx react-native run-android":

  • What went wrong: Could not open settings generic class cache for settings file 'D:\Coding\New folder\MHLSLEAGUE\android\settings.gradle' (C:\Users\tamer.gradle\caches\8.0.1\scripts\73fo79rs4o85yhjvff7lwhytg).

BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 64


right before that:

i Changed the "BuildToolsVersion" in the build.gradle to '33.0.0' instead of findProperty('android.buildToolsVersion') ?: '33.0.0' because of the react-native doctor error [✖ Android SDK - Required for building and installing your app on Android

1 Answer 1

0

Solution:

For Linux/Mac OS:

Go to Terminal:

~ cd home

~ cd yourDirectory   //eg:ashif

~ cd Android

~ cd cd build-tools

~ cd 33.0.0         //your desired build-tools version

~ cp d8 dx          //copy d8 and create directory dx

~ cd lib

~ cp d8.jar dx.jar  //copy d8.jar and create directory dx.jar

~ ls                //to list and check the changes

For Windows:

~ Go to Home Directory/Folder    //where the Android dir is present eg: inside C://

~ Inside click android dir

~ Inside click Sdk dir

~ Inside click build-tools dir

~ Inside click desired directory 33.0.0   //your desired build-tools version

~ Inside that, copy the d8 folder paste it in the same location, and rename it as dx

~ Inside And click lib dir

~ Inside copy d8.jar and paste it in the same location and rename it as dx.jar

That's it! It Works 😊.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.