So, this is becoming an absolute nightmare and it seems there is no one solution for all. I’ve been going through different tutorials, YouTube videos, and none of them seem to mention how to build my app without using EAS (I tried it, it kept failing to build for some reason or another, so I gave up).
Now, from what I can tell, I am close to finally being able to build an APK. Thing is, this is just barebones. I used “create-react-app” from the start and I haven’t changed any files yet because I want to know how to build. I ran npx expo run:android which created the android folder. I cd’d into it and ran the following…
./gradlew :app:assembleRelease
It starts to build, but it then fails. Full log below.
> Configure project :expo
Using expo modules
- expo-asset (10.0.6)
- expo-constants (16.0.1)
- expo-file-system (17.0.1)
- expo-font (12.0.4)
- expo-keep-awake (13.0.1)
- expo-modules-core (1.12.10)
> Task :app:createBundleReleaseJsAndAssets
warning: Bundler cache is empty, rebuilding (this may take a minute)
Error: Unable to resolve module ../../App from C:UsersDanielDesktopMobile AppsReactwashwisenode_modulesexpoAppEntry.js:
None of these files exist:
* App(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css)
* Appindex(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css)
1 | import registerRootComponent from 'expo/build/launch/registerRootComponent';
2 |
> 3 | import App from '../../App';
| ^
4 |
5 | registerRootComponent(App);
6 |
Error: Unable to resolve module ../../App from C:UsersDanielDesktopMobile AppsReactwashwisenode_modulesexpoAppEntry.js:
None of these files exist:
* App(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css)
* Appindex(.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.mjs|.native.mjs|.mjs|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.cjs|.native.cjs|.cjs|.android.scss|.native.scss|.scss|.android.sass|.native.sass|.sass|.android.css|.native.css|.css)
1 | import registerRootComponent from 'expo/build/launch/registerRootComponent';
2 |
> 3 | import App from '../../App';
| ^
4 |
5 | registerRootComponent(App);
6 |
at ModuleResolver.resolveDependency (C:UsersDanielDesktopMobile AppsReactwashwisenode_modulesmetrosrcnode-hasteDependencyGraphModuleResolution.js:112:15)
at DependencyGraph.resolveDependency (C:UsersDanielDesktopMobile AppsReactwashwisenode_modulesmetrosrcnode-hasteDependencyGraph.js:231:43)
at C:UsersDanielDesktopMobile AppsReactwashwisenode_modulesmetrosrclibtransformHelpers.js:156:21
at resolveDependencies (C:UsersDanielDesktopMobile AppsReactwashwisenode_modulesmetrosrcDeltaBundlerbuildSubgraph.js:42:25)
at visit (C:UsersDanielDesktopMobile AppsReactwashwisenode_modulesmetrosrcDeltaBundlerbuildSubgraph.js:83:30)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at async buildSubgraph (C:UsersDanielDesktopMobile AppsReactwashwisenode_modulesmetrosrcDeltaBundlerbuildSubgraph.js:103:3)
at async Graph._buildDelta (C:UsersDanielDesktopMobile AppsReactwashwisenode_modulesmetrosrcDeltaBundlerGraph.js:157:22)
at async Graph.initialTraverseDependencies (C:UsersDanielDesktopMobile AppsReactwashwisenode_modulesmetrosrcDeltaBundlerGraph.js:140:19)
> Task :app:createBundleReleaseJsAndAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:createBundleReleaseJsAndAssets'.
> Process 'command 'cmd'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 14s
20 actionable tasks: 4 executed, 16 up-to-date
I cannot find one solution to this at all. Any ideas?
Expecting it to build the APK without issue.