Wallety icon indicating copy to clipboard operation
Wallety copied to clipboard

Problem trying to create .apk file

Open fecampossantos opened this issue 2 years ago • 2 comments

First of all, congrats for the project!! I was looking for a budget tracker and found one that not only looks greate, but safe and I can check (and change) the code!!

I'm trying to generate the apk file for it, but after running npm install

and cd android/ ./gradlew assembleRelease (I actually had problems for the second line, gradlew didn't have the necessary permissions, so I had to run a chmod u+x gradlew to solve it)

anyways, after running assembleRelease I receive this:

:ReactNative:Unexpected empty result of running '[node, -e, try {console.log(require('@react-native-community/cli').bin);} catch (e) {console.log(require('react-native/cli').bin);}]' command.
:ReactNative:Running '[node, -e, try {console.log(require('@react-native-community/cli').bin);} catch (e) {console.log(require('react-native/cli').bin);}]' command failed.

FAILURE: Build failed with an exception.

* Where:
Script '/home/felipe/git/personal/Wallety/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 213

* What went wrong:
A problem occurred evaluating script.
 > /home/felipe/git/personal/Wallety/node_modules/metro/src/Server.js:376  processRequest = (req, res, next) => {                 ^SyntaxError: Unexpected token =    at Module._compile (internal/modules/cjs/loader.js:723:23)    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)    at Module.load (internal/modules/cjs/loader.js:653:32)    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)    at Function.Module._load (internal/modules/cjs/loader.js:585:3)    at Module.require (internal/modules/cjs/loader.js:692:17)    at require (internal/modules/cjs/helpers.js:25:18)    at Object.<anonymous> (/home/felipe/git/personal/Wallety/node_modules/metro/src/shared/output/bundle.js:14:16)    at Module._compile (internal/modules/cjs/loader.js:778:30)    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

I tried to solve it by installing, via npm, the packages react-native, metro and react-native-community, cli-platform-android. None of them fixed, so after reading more about the error, I tried to install gradle but unfortunately I couldn't fix it.

I'm looking foward to being able to generate the apk, mostly because I woudl really like to propose some changes (like adding Brazilian Real as curreny) but I would like to test it in the apk first.

Thanks!

fecampossantos avatar May 20 '22 13:05 fecampossantos