callstack / callstack/react-native-builder-bob
Android Nitro Module wrong package path created
- Langage dominant
- JavaScript
- Étoiles
- 3.2k
- Forks
- 228
- Merge moyen
- 7 j 12 h
- PR mergées (30 j)
- 3
Description
### Description
I just created a new library with Nitro modules, after running Nitrogen, I start Android project, and it's throwing:
```
/Users/james/Code/Personal/react-native/react-native-app-nitro/example/android/app/build/generated/autolinking/src/main/java/com/facebook/react/PackageList.java:14: error: cannot find symbol
import com.margelo.nitro.appnitro.AppNitroPackage;
^
symbol: class AppNitroPackage
location: package com.margelo.nitro.appnitro
/Users/james/Code/Personal/react-native/react-native-app-nitro/example/android/app/build/generated/autolinking/src/main/java/com/facebook/react/PackageList.java:62: error: cannot find symbol
new AppNitroPackage(),
```
I found that it tries to `import com.margelo.nitro.appnitro.AppNitroPackage;`, but the generated project, the AppNitroPackage is in wrong folder:

I manually move the file to the expected folder and able to run Android
### Packages
- [x] create-react-native-library
- [ ] react-native-builder-bob
### Selected options
Nitro Module
### Link to repro
NA
### Environment
Macbook M1
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start by tracing the Nitro Module generation entry point used by Nitrogen and compare the generated AppNitroPackage location with the import in the generated Android PackageList.java. Reproduce the Android build from the reported create-react-native-library setup if possible; done means the generated package path and import match so the project builds without manually moving the file.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, react-native
- Domaine
- build-system, mobile
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100