I have the same error with command
pod spec lint
When I run my project with Xcode or with command
npx react-native run-android
all it works.