androidreact-nativereact-native-bridge

Fabric Native Component throwing error in build folder PackageList.java file error: cannot find symbol import com.rtncenteredtext.CenteredTextPackage;


I have tried fabric native components as given in https://reactnative.dev/docs/next/the-new-architecture/pillars-fabric-components?fabric-component-specs=flow&android-language=kotlin for android. And it is throwing error following.

MyFabricApp/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:15: error: cannot find symbol import com.rtncenteredtext.CenteredTextPackage; ^ symbol: class CenteredTextPackage location: package com.rtncenteredtext MyFabricApp/android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:61: error: cannot find symbol new CenteredTextPackage() ^ symbol: class CenteredTextPackage location: class PackageList 2 errors


Solution

  • Reset cache and run app again, that will solve this issue

    npm start --reset-cache