th3rdwave / react-native-safe-area-context

A flexible way to handle safe area insets in JS. Also works on Android and Web!
MIT License
2.08k stars 191 forks source link

error: cannot find symbol import com.th3rdwave.safeareacontext.SafeAreaContextPackage; #419

Closed robertclarkson closed 11 months ago

robertclarkson commented 11 months ago

Errors on a new install on a mostly empty React Native project

"react-native": "0.72.3", "react-native-paper": "^5.9.1", "react-native-safe-area-context": "^4.7.1",

ReactNative/glacierwallet/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:17: error: cannot find symbol
import com.th3rdwave.safeareacontext.SafeAreaContextPackage;
                                    ^
  symbol:   class SafeAreaContextPackage
  location: package com.th3rdwave.safeareacontext
ReactNative/glacierwallet/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:66: error: cannot find symbol
      new SafeAreaContextPackage(),
          ^
  symbol:   class SafeAreaContextPackage
  location: class PackageList
2 errors

FAILURE: Build failed with an exception.
jacobp100 commented 11 months ago

Try doing a clean with gradle

jacobp100 commented 11 months ago

Assuming it's fixed. Shout if you're still having issues

Cnordbo commented 11 months ago

Just a shoutout after coming here from googling the same error - executing ./gradlew clean from the android folder fixed the issue.

Thanks @jacobp100

StackZombie commented 4 months ago

Assuming it's fixed. Shout if you're still having issues

i am having this error even after cleaning gradlew

Dr-Ray commented 3 months ago

Worked for me thanks