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

React Native Windows App looks for MainApplication.java file, but my app has MainApplication.kt #12734

Closed
dannyouu opened this issue Feb 14, 2024 · 6 comments
Labels

Comments

@dannyouu
Copy link

dannyouu commented Feb 14, 2024

Problem Description

I have a react native app that runs on both iOS and Android (0.73.0) and when I try to create a windows build following the article here - https://microsoft.github.io/react-native-windows/docs/getting-started
I get the following error:
image
And after following the steps I still get the same error.

Here's a screenshot of my android folder.
image

Steps To Reproduce

I Just follow the steps in this article: https://microsoft.github.io/react-native-windows/docs/getting-started

Expected Results

I expect to have my RN app, running on windows.

CLI version

npx react-native -v 12.2.0

Environment

npx react-native info
info Fetching system and libraries information...
System:
  OS: Windows 10 10.0.19045
  CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1255U 
  Memory: 13.36 GB / 31.69 GB
Binaries:
  Node:
    version: 20.10.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 4.0.2
    path: ~\AppData\Roaming\npm\yarn.CMD
  npm:
    version: 9.6.0
    path: C:\Program Files\nodejs\npm.CMD
  Watchman:
    version: 20231008.002904.0
    path: C:\ProgramData\chocolatey\bin\watchman.EXE
SDKs:
  Android SDK:
    API Levels:
      - "29"
      - "31"
      - "33"
      - "33"
      - "34"
    Build Tools:
      - 29.0.2
      - 30.0.2
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 33.0.2
      - 34.0.0
    System Images:
      - android-28 | Google APIs Intel x86 Atom
      - android-29 | Intel x86 Atom_64
      - android-29 | Google APIs Intel x86 Atom
    Android NDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    AllowAllTrustedApps: Enabled
    Versions:
      - 10.0.19041.0
      - 10.0.22621.0
IDEs:
  Android Studio: AI-221.6008.13.2211.9619390
  Visual Studio:
    - 17.8.34330.188 (Visual Studio Professional 2022)
Languages:
  Java:
    version: 17.0.9
    path: C:\Users\YordanIvanov\.jdks\corretto-17.0.9\bin\javac.EXE
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 12.2.0
    wanted: ^12.1.1
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.0
    wanted: ^0.73.0
  react-native-windows:
    installed: 0.73.6
    wanted: 0.73.6
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

info React Native v0.73.4 is now available (your project is running on v0.73.0).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.73.4
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.73.4
info For more info, check out "https://reactnative.dev/docs/upgrading?os=windows".

Target Platform Version

10.0.19041

Target Device(s)

Desktop

Visual Studio Version

Visual Studio 2022

Build Configuration

Debug

Snack, code example, screenshot, or link to a repository

The newly created app builds flawlessly.

@dannyouu dannyouu added the bug label Feb 14, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Feb 14, 2024
@chrisglein
Copy link
Member

I'm confused about seeing an error about MainApplication.java, because neither that nor MainApplication.kt should have any relevance in your windows project. Your windows project will either have C++ or C# files isntead. Can you share the layout of your windows project after you completed the getting started steps?

@chrisglein chrisglein added the Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) label Feb 14, 2024
@jonthysell
Copy link
Contributor

It looks like the error is coming from something called firebase? It doesn't look like that module supports windows.

@dannyouu
Copy link
Author

I'm confused about seeing an error about MainApplication.java, because neither that nor MainApplication.kt should have any relevance in your windows project. Your windows project will either have C++ or C# files isntead. Can you share the layout of your windows project after you completed the getting started steps?

Here's a screenshot of the entire tree:
image

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 An issue that had been tagged "Needs: Author Feedback" has received activity (label applied by bot) and removed Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) labels Feb 19, 2024
@chrisglein
Copy link
Member

It looks like the error is coming from something called firebase? It doesn't look like that module supports windows.

@dannyouu can you share the module dependencies from your package.json?
None of the firebase modules appear to support Windows: https://reactnative.directory/?search=firebase&windows=true

@chrisglein chrisglein added Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) Needs: Attention 👋 An issue that had been tagged "Needs: Author Feedback" has received activity (label applied by bot) labels Feb 22, 2024
@dannyouu
Copy link
Author

It looks like the error is coming from something called firebase? It doesn't look like that module supports windows.

@dannyouu can you share the module dependencies from your package.json? None of the firebase modules appear to support Windows: https://reactnative.directory/?search=firebase&windows=true

Hi Chris, it's too long for a screenshot, here's the pasted code:

"dependencies": {
"@babel/traverse": "7.23.2",
"@growthbook/growthbook-react": "^0.17.0",
"@react-native-async-storage/async-storage": "^1.21.0",
"@react-native-community/cli": "^12.1.1",
"@react-native-community/cli-platform-android": "^12.1.1",
"@react-native-community/netinfo": "^11.0.1",
"@react-native-firebase/analytics": "17.4.3",
"@react-native-firebase/app": "17.4.3",
"@react-native-firebase/remote-config": "17.4.3",
"@react-navigation/bottom-tabs": "^6.4.0",
"@react-navigation/core": "^6.4.9",
"@react-navigation/drawer": "^6.6.6",
"@react-navigation/elements": "^1.3.19",
"@react-navigation/native": "^6.1.8",
"@react-navigation/native-stack": "^6.9.14",
"@reduxjs/toolkit": "^1.7.1",
"@sentry/node": "^7.58.1",
"@sentry/profiling-node": "^1.1.1",
"@sentry/react-native": "5.5.0",
"@sentry/tracing": "^7.45.0",
"@skarlatov/react-event-bus": "2.0.6",
"abab": "^2.0.6",
"axios": "^1.3.4",
"axios-mock-adapter": "^1.20.0",
"date-fns": "^2.28.0",
"emoji-regex": "^10.3.0",
"i18next": "21.9.1",
"immutability-helper": "^3.1.1",
"jwt-decode": "^3.1.2",
"lodash": "^4.17.21",
"normalizr": "^3.6.2",
"react": "18.2.0",
"react-i18next": "^13.2.2",
"react-native": "^0.73.0",
"react-native-aes-crypto": "^3.0.1",
"react-native-bootsplash": "4.1.0",
"react-native-config": "^1.5.1",
"react-native-currency-input": "^1.0.1",
"react-native-device-info": "8.4.8",
"react-native-elements": "^3.4.2",
"react-native-fast-image": "8.5.11",
"react-native-gesture-handler": "^2.14.0",
"react-native-get-random-values": "^1.9.0",
"react-native-gradle-plugin": "^0.71.19",
"react-native-interactable": "^2.0.1",
"react-native-keychain": "^8.1.2",
"react-native-localize": "^2.2.4",
"react-native-orientation-locker": "1.4.0",
"react-native-pager-view": "6.0.0",
"react-native-permissions": "3.2.0",
"react-native-reanimated": "^3.6.0",
"react-native-reanimated-carousel": "^3.5.0",
"react-native-rsa-native": "^2.0.5",
"react-native-safe-area-context": "^4.5.3",
"react-native-screens": "^3.21.0",
"react-native-size-matters": "^0.4.0",
"react-native-svg": "^14.0.0",
"react-native-svg-transformer": "patch:react-native-svg-transformer@patch%3Areact-native-svg-transformer@npm%253A1.1.0%23~/.yarn/patches/react-native-svg-transformer-npm-1.1.0-0268e56ebd.patch%3A%3Aversion=1.1.0&hash=389e8e#",
"react-native-user-inactivity": "^1.2.0",
"react-native-uuid": "^2.0.1",
"react-native-vector-icons": "^10.0.0",
"react-native-vision-camera": "patch:react-native-vision-camera@npm%3A3.6.14#~/.yarn/patches/react-native-vision-camera-npm-3.6.14-4de68f47f3.patch",
"react-native-windows": "0.73.6",
"react-redux": "^7.2.6",
"redux": "^4.1.1",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.4.2",
"ts-node": "10.9.1",
"uuidv4": "^6.2.13"
},
"devDependencies": {
"@babel/core": "^7.21.8",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
"@babel/plugin-proposal-optional-chaining": "^7.16.7",
"@babel/plugin-transform-arrow-functions": "^7.16.7",
"@babel/plugin-transform-shorthand-properties": "^7.16.7",
"@babel/plugin-transform-template-literals": "^7.16.7",
"@babel/preset-typescript": "^7.16.7",
"@babel/runtime": "^7.23.1",
"@cucumber/cucumber": "~8.2.0",
"@react-native-community/eslint-config": "3.0.1",
"@react-native-community/eslint-plugin": "1.1.0",
"@react-native/babel-preset": "^0.73.18",
"@react-native/eslint-config": "^0.73.1",
"@react-native/metro-config": "^0.73.2",
"@react-native/typescript-config": "^0.73.1",
"@testing-library/jest-dom": "5.16.1",
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/react-native": "^12.3.2",
"@types/detox": "^18.1.0",
"@types/jest": "^29.0.3",
"@types/lodash": "^4.14.195",
"@types/react": "^18.2.6",
"@types/react-redux": "^7.1.30",
"@types/react-test-renderer": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.9.1",
"@typescript-eslint/parser": "^5.9.1",
"@welldone-software/why-did-you-render": "^7.0.1",
"babel-jest": "^29.6.3",
"cross-env": "^7.0.3",
"dependency-cruiser": "^13.1.0",
"detox": "20.1.0",
"eslint": "^8.40.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-flowtype": "8.0.3",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-json": "3.1.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-react-native": "4.0.0",
"eslint-plugin-react-native-a11y": "3.3.0",
"eslint-plugin-simple-import-sort": "10.0.0",
"eslint-plugin-sort-keys-fix": "1.1.2",
"eslint-plugin-testing-library": "5.10.3",
"eslint-plugin-unused-imports": "^2.0.0",
"husky": "^7.0.4",
"jest": "^29.6.3",
"jest-circus": "^27.4.6",
"jest-fetch-mock": "^3.0.3",
"jest-html-reporter": "^3.4.2",
"jest-junit": "^16.0.0",
"madge": "^6.1.0",
"metro-config": "^0.80.0",
"mockdate": "^3.0.5",
"msw": "^2.0.3",
"prettier": "2.8.8",
"react-addons-test-utils": "^15.6.2",
"react-devtools": "^4.26.0",
"react-native-codegen": "0.0.12",
"react-test-renderer": "18.2.0",
"reassure": "^0.9.1",
"rimraf": "^5.0.1",
"ts-jest": "^29.1.1",
"typescript": "^5.0.4",
"whatwg-fetch": "^3.6.17"
},
"engines": {
"npm": "please-use-yarn",
"yarn": ">= 4.0.2",
"node": ">=18"
},
"config": {},
"packageManager": "yarn@4.0.2"

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 An issue that had been tagged "Needs: Author Feedback" has received activity (label applied by bot) and removed Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) labels Feb 23, 2024
@chrisglein
Copy link
Member

Thanks, the list of modules is very helpful.
The problem is that among your dependencies are many modules that don't support Windows. Check the directory link I provided above. Particularly the firebase dependencies, but maybe more. For those, follow up with issues on the community modules themselves.

@chrisglein chrisglein closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2024
@chrisglein chrisglein removed the Needs: Attention 👋 An issue that had been tagged "Needs: Author Feedback" has received activity (label applied by bot) label Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants