Can't build my android project after move it to another computer

Viewed 4845

I can't build my android project in react native project, i just used this project in my old computer and it built fine, but after i clone it from my new macbook i get error.

I tried to delete the cache folder and it didn't help.

The error that i get:

FAILURE: Build failed with an exception.

  • What went wrong: Could not open settings remapped class cache for espedq8f7vbnwrshulq11juyl (/Users/(UserName)/.gradle/caches/5.0/scripts-remapped/settings_3tlaqtt0fziq08p73u9gmyutn/espedq8f7vbnwrshulq11juyl/settingsa9190c3ddc71e1450eb3f3e7bc6a334f).
  • Could not open settings generic class cache for settings file '/Users/(UserName)/Desktop/MyApp/friendsapp/client/android/settings.gradl' (/Users/(UserName)/.gradle/caches/5.0/scripts/espedq8f7vbnwrshulq11juyl/settings/settingsa9190c3ddc71e1450eb3f3e7bc6a334f).

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

2 Answers

Yes i found the answer! I just clicked in android studio, FILE -> sync project with gradle files . It did the magic !

Edit

Help me so many times for building:

  1. yarn add jetifier
  2. yarn run jetify
  3. rebuild project in android studio

To clear Android Studio's cache and bring it out of its state of confusion, select 'File > Invalidate Caches / Restart' and then click the 'Invalidate and Restart' button. You should invalidate caches from android studio not deleting cache folder directly.

Related