-
-
Notifications
You must be signed in to change notification settings - Fork 21
Error on building the apk #30
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
Comments
why did you renamed all the folders ? |
For all i meant, the main folder, that rest vue-example, and in the package the app-name and the name that rest vue example too, but also after that it retrives that error too EDIT: Also leaving the name of folder and app name it gives by default with the init, it returns the same error: |
Hey, we have release new version of Follow these instruction to upgrade $ npm uninstall -g androidjs-builder
$ npm install -g androidjs-builder@2.1.5 Feel free to ask in case of any problem ; ) |
I tried to create sample project but got similar result:
|
I also got this problem on androidjs version 2.1.8 and resolved it manually by downloading the latest .jar file for the Apktool (v2.4.1 tagged on their GitHub repo) and replacing the one inside node_modules/androidjs-builder/build_tools |
I have a bug on Windows and Ubuntu when use copying assets ...
updating app name...
updating theme ...
Using SDK: 2.0.8
Building Apk ...
events.js:292
throw er; // Unhandled 'error' event
^
Error: spawn java ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn java',
path: 'java',
spawnargs: [
'-jar',
'C:\\Users\\█████\\AppData\\Roaming\\npm\\node_modules\\androidjs-builder\\build_tools\\apktool.jar',
'b',
'C:\\Users\\█████\\.androidjs\\cache\\androidjs-sdk',
'-o',
'C:\\Users\\█████\\.androidjs\\cache\\█████.apk',
'--frame-path',
'C:\\Users\\█████\\.androidjs\\cache'
]
} |
I'm referring to the attached answer, error gone after installing Java 1.8 and I'm able to build APK file now. |
Thanks for such words and I think you should look for docs actually because we have already mentioned about java >=1.8 as requirements |
Thanks @Chhekur , I don't find it in documentation. even using the search form. |
You can user express and ejs there is no issues in that |
Thanks for reply @Chhekur .. It works fine in browser with no errors in nodejs consonle, but on start app on android device I got error: here is my main.js file content: const express = require('express');
const eApp = express();
const ejs = require('ejs');
eApp.set('view engine', 'ejs');
eApp.set('views', './views');
eApp.use( express.static('./') );
eApp.get('/', (req, res)=>{
res.render('index');
});
eApp.get('/:pagename', (req, res)=>{
res.render(req.params.pagename);
});
eApp.listen(3000); // even with a different port I got same issue App directory structure:
Could you give me a hint please ? |
You are actually running server on port 3000 but by default app always look for index.html in views folder as entrypoint so what you do is create index.html in views folder with following javascript code, make sure you include androidjs in html file app.loadURL("http://localhost:3000"); Then it will redirect to your server route |
Thanks for support @Chhekur . |
Uh oh!
There was an error while loading. Please reload this page.
Hello! Launching androidjs b -f it returns this error:
And i've just renamed all, folders, appname, etc
The text was updated successfully, but these errors were encountered: