android-js / androidjs

Platform to build android app using node js
MIT License
465 stars 109 forks source link

Exit 1 from building apk and impossible to update #87

Open Romans96 opened 4 years ago

Romans96 commented 4 years ago

Describe the bug From 1 day when i try to build an app, it returns exit 1 and i have any errors in the app. When i try to update i obtain the error:

$ androidjs u
updating ... 
 downloading sdk [ ======================================   ] 52993628/55969500 2941966/bps 94% 1.0s
C:\Users\Mattia\AppData\Roaming\npm\node_modules\androidjs-builder\node_modules\adm-zip\adm-zip.js:22
                        throw Utils.Errors.INVALID_FILENAME;
                        ^
Invalid filename
(Use `node --trace-uncaught ...` to show where the exception was thrown)

Expected behavior It does not update

Desktop (please complete the following information):

Additional context Tried also to remove and reinstall androidjs in the project, but nothing, it didn't solved anything

Chhekur commented 4 years ago

Please remove .androidjs folder from /Users/<username>/.androidjs and then update thesdk

$ androidjs update
Romans96 commented 4 years ago

Please remove .androidjs folder from /Users/<username>/.androidjs and then update thesdk

$ androidjs update

Hello, it does not change anything, deleting that folder, reinstalling androidjs-builder, androidjs update and android b (-f) do not work

Chhekur commented 4 years ago

Please remove .androidjs folder from /Users/<username>/.androidjs and then update thesdk

$ androidjs update

Hello, it does not change anything, deleting that folder, reinstalling androidjs-builder, androidjs update and android b (-f) do not work

You don't actually need to reinstall androidjs-builder and androidjs you just need to delete .androidjs folder because here the issue with sdk

Romans96 commented 4 years ago

Please remove .androidjs folder from /Users/<username>/.androidjs and then update thesdk

$ androidjs update

Hello, it does not change anything, deleting that folder, reinstalling androidjs-builder, androidjs update and android b (-f) do not work

You don't actually need to reinstall androidjs-builder and androidjs you just need to delete .androidjs folder because here the issue with sdk

Nothing happens deleting it and restarting the update, it returns the same error

Romans96 commented 4 years ago

Nothing to do, same errors both for update and for create the sdk, also after delete the .androidjs folder it doesn't change anything

Chhekur commented 4 years ago

Nothing to do, same errors both for update and for create the sdk, also after delete the .androidjs folder it doesn't change anything

I can actually tell you the manual approach if you are facing this problem again and again. Follow the following steps:

  1. Download the repository as zip: https://github.com/android-js/androidjs-sdk
  2. Extract the content of it inside the .androidjs folder, if folder doesn't exists then create and then extract the content into it
  3. Path of the .androidjs folder is /Users/<username>/.androidjs
  4. Then try to build APK

Feel free to ask, if you face any other problem ; )

Chhekur commented 4 years ago

Hey, we have release new version of androidjs-builder@2.1.5, which may solve all the existing problem. So you can upgrade to the latest version 2.1.5 and enjoy.

Follow these instruction to upgrade androidjs-builder to latest

$ npm uninstall -g androidjs-builder
$ npm install -g androidjs-builder@2.1.5

Feel free to ask in case of any problem ; )

Chhekur commented 4 years ago

Hey, we have created a slack channel for support & discussion: join here