Giter Club home page Giter Club logo

Comments (13)

Chhekur avatar Chhekur commented on August 25, 2024

Sometime this happens in windows machine, so you can manually change the name 😅

from androidjs.

jtoppine avatar jtoppine commented on August 25, 2024

Sometime this happens in windows machine, so you can manually change the name 😅

Ok, thank you. However it seems to not execute actions after that error. If I read correctly, after renaming, androidjs init tries at least to update package.json:


                 pkg['name'] = this.androidjs.project.name;
                 pkg['app-name'] = this.androidjs.project.name;
                 pkg['package-name'] = this.androidjs.project.name;


                 pkg['scripts']['install'] = "adb install ./dist/app.apk";
                 pkg['scripts']['run'] = `adb shell am start -n com.android.js.${this.androidjs.project.name}/com.android.js.webview.MainActivity`;
                 pkg['scripts']['build:run'] = "androidjs build && npm run install && npm run run";
                 pkg['theme'] = {
                    "fullScreen": true,
                    "colorAccent": "@color/colorAccent",
                    "colorPrimary": "@color/colorPrimary",
                    "colorPrimaryDark": "@color/colorPrimaryDark"
                };
 

                 jsonfile.writeFileSync(path.join(this.androidjs.project.paths.__dirname, this.androidjs.project.name, 'package.json'), pkg, { spaces: 4 })

Those actions won't get done because of the unhandled exception. I can do those changes manually too, I guess. Not sure if there is something else that should be done to create a working new project. Androidjs build fails on that newly created, manually renamed project though ("Error: total required
at new ProgressBar ", a problem that seems to have it's own submission here on the issue tracker..)

from androidjs.

Chhekur avatar Chhekur commented on August 25, 2024

Error: total required error occurs when your internet is slow or unavailable.

In order to overcome this error repeatedly try build command until it start fetching sdk

from androidjs.

jtoppine avatar jtoppine commented on August 25, 2024

Error: total required error occurs when your internet is slow or unavailable.

In order to overcome this error repeatedly try build command until it start fetching sdk

Yes, this seems to work as a workaround!

from androidjs.

 avatar commented on August 25, 2024

This is still a problem and it has nothing to do with the internet connection. If I run androidjs init on Ubuntu, on the same machine and same internet connection, it works fine on the first try. On Windows it doesn't work even on a datacenter connection.

from androidjs.

jughead101 avatar jughead101 commented on August 25, 2024

Facing the same issue ...

from androidjs.

Chhekur avatar Chhekur commented on August 25, 2024

This bug is gonna fix in the new release, which you'll get very soon ; )

from androidjs.

Chhekur avatar Chhekur commented on August 25, 2024

Hey, we have release new version of [email protected], which may solve all the existing problem.
So you can upgrade to the latest version 2.1.4 and enjoy.

Follow these instruction to upgrade androidjs-builder to latest

$ npm uninstall -g androidjs-builder
$ npm install -g [email protected]

Feel free to ask in case of any problem ; )

from androidjs.

jughead101 avatar jughead101 commented on August 25, 2024

Hi Chhekur,

Getting the following error:

loadDep:yargs → resolveWi ▌ ╢██████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
loadDep:fsevents → 304 ▐ ╢████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm ERR! Linux 4.4.0-18362-Microsoft
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "[email protected]"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror http://github.com/npm/npm/issues

Regards,
Amit

from androidjs.

jughead101 avatar jughead101 commented on August 25, 2024

Hi Chhekur,

Getting the following error:

loadDep:yargs → resolveWi ▌ ╢██████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
loadDep:fsevents → 304 ▐ ╢████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm ERR! Linux 4.4.0-18362-Microsoft
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "[email protected]"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror http://github.com/npm/npm/issues

Regards,
Amit

Installing the latest NPM solved the issue ...

npm install -g npm@latest

from androidjs.

jughead101 avatar jughead101 commented on August 25, 2024

failing at build now:

androidjs build

copying assets ...
updating app name...
updating theme ...
Using SDK: 2.0.4
Building Apk ...
events.js:183
throw er; // Unhandled 'error' event
^

Error: spawn java ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: androidjs build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.

from androidjs.

jughead101 avatar jughead101 commented on August 25, 2024

failing at build now:

androidjs build

copying assets ...
updating app name...
updating theme ...
Using SDK: 2.0.4
Building Apk ...
events.js:183
throw er; // Unhandled 'error' event
^

Error: spawn java ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: androidjs build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.

Ok.. .solved it
apt install default-jre

from androidjs.

Chhekur avatar Chhekur commented on August 25, 2024

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

from androidjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.