Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android, AndroidTV, Androidwear] template-starter fails to build #1122

Closed
pauliusguzas opened this issue Oct 5, 2023 · 3 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@pauliusguzas
Copy link
Collaborator

pauliusguzas commented Oct 5, 2023

Describe the bug
Can't run/build/export all android platforms

To Reproduce

  1. go to template-starter package
  2. run rnv run -p android
✖ FAILED: npx react-native build-android --mode=Debug --no-packager
COMMAND:

npx react-native build-android --mode=Debug --no-packager

FAILED with ERROR:

error Android project not found. Are you sure this is a React Native project? If your Android files are located in a non-standard location (e.g. not inside 'android' folder), consider setting `project.android.sourceDir` option to point to a new location.

Command failed with exit code 1: npx react-native build-android --mode=Debug --no-packager
warn Multiple Podfiles were found: platformBuilds/template_ios/Podfile,platformBuilds/template_tvos/Podfile. Choosing platformBuilds/template_ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
error Android project not found. Are you sure this is a React Native project? If your Android files are located in a non-standard location (e.g. not inside 'android' folder), consider setting `project.android.sourceDir` option to point to a new location.

warn Multiple Podfiles were found: platformBuilds/template_ios/Podfile,platformBuilds/template_tvos/Podfile. Choosing platformBuilds/template_ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
error Android project not found. Are you sure this is a React Native project? If your Android files are located in a non-standard location (e.g. not inside 'android' folder), consider setting `project.android.sourceDir` option to point to a new location.

Error: Command failed with exit code 1: npx react-native build-android --mode=Debug --no-packager
warn Multiple Podfiles were found: platformBuilds/template_ios/Podfile,platformBuilds/template_tvos/Podfile. Choosing platformBuilds/template_ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
error Android project not found. Are you sure this is a React Native project? If your Android files are located in a non-standard location (e.g. not inside 'android' folder), consider setting `project.android.sourceDir` option to point to a new location.
    at makeError (/Users/pauliusguzas/Desktop/renative/renative/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/pauliusguzas/Desktop/renative/renative/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)



 $ rnv build -p android - Done! 🚀
┌──────────────────────────────────────────────────────────────────────────────┐
│  🚀  SUMMARY | 10/11/2023, 11:00:18 AM                                       │
│  $ rnv build -p android                                                      │
├──────────────────────────────────────────────────────────────────────────────┤
│  ReNative Version: 1.0.0-canary.1                                            │
│  Project Name ($package.name): @rnv/template-starter                         │
│  Project Version ($package.version): 1.0.0-canary.1                          │
│  Workspace ($.workspaceID): rnv                                              │
│  Platform (-p): android                                                      │
│  Engine ($.platforms.android.engine): engine-rn                              │
│  App Config (-c): template                                                   │
│  Build Scheme (-s): debug                                                    │
│  Target (-t): Pixel_4_API_29                                                 │
│  Supported Platforms: android                                                │
│  Env Info: darwin | x64 | node v18.16.0                                      │
│  Executed Time: 0h:0m:6s:577ms                                               │
│                                                                              │
│ [ error ] [configure] Cannot write file. source path doesn't exists: /Users/pauliusguzas/Desktop/renative/renative/packages/engine-rn/templates/platforms/android/app/src/main/java/rnv/SplashActivity.kt
│                                                                              │
│  Project location:                                                           │
│  ./platformBuilds/template_android                                           │
└──────────────────────────────────────────────────────────────────────────────┘
pauliusguzas@MacBook-Pro-de-Flexn template-starter %

Expected behavior
Template app should start in Android simulator

Desktop (please complete the following information):

  • OS: Ventura 13.5.2
  • Node Version 18.16.0
  • RNV Version 1.0.0-canary.1
  • rnv/template-starter Version 1.0.0-canary.1
@pauliusguzas
Copy link
Collaborator Author

sanity_1.0.0-2 update: run works, export/build doesn't

@GabrieleKaceviciute
Copy link
Collaborator

GabrieleKaceviciute commented Oct 27, 2023

Note - when I create new project and do npx rnv build/export -p android, I'm getting the same error on 1.0.0-canary.7 (on all android platforms and firetv)

@pauliusguzas
Copy link
Collaborator Author

Not reproduced on 1.0.0-feat-pin-cli.2

@pavjacko pavjacko added this to the 1.0 milestone Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants