【发布时间】:2019-06-21 06:08:01
【问题描述】:
我正在学习使用 androidjs 库从 nodejs 构建 android 应用程序。 官网-https://android-js.github.io/, 文档-https://android-js.github.io/androidjs/ 因此,我从其官方网站提供的示例应用程序开始,源代码链接-https://github.com/android-js/androidjs/,安装所有必要的软件包并按照提供的程序进行操作。但是从来没有构建过apk文件,我用代码1退出了构建过程,并且用代码1退出了签名过程。 这是我在控制台中得到的:
{ DEBUG: false,
BUILDER__cwd: '/usr/local/lib/node_modules/androidjs-builder',
PROJECT__cwd: '/home/satnam/AndroidStudioProjects/mywork/story app',
PROJECT__dist: '/home/satnam/AndroidStudioProjects/mywork/story app/dist',
PROJECT__DIST__name: 'dist',
platform: 'linux',
force_replace: true }
app core copied !
Core Modules Copied !
copying user app done.
User data copied
reading /home/satnam/AndroidStudioProjects/mywork/story app/dist/app-debug/AndroidManifest.xml
User assets cleared
package name com.androidjs.mypkg
{ '$': { 'android:name': 'android.permission.INTERNET' } }
{ '$':
{ 'android:name': 'android.permission.WRITE_EXTERNAL_STORAGE' } }
{ '$':
{ 'android:name': 'android.permission.READ_EXTERNAL_STORAGE' } }
android.webkit.PermissionRequest
Done!
AndroidManifest updated!
changing app name /home/satnam/AndroidStudioProjects/mywork/story app/dist/app-debug/res/values/strings.xml
{ _: 'myapp', '$': { name: 'app_name' } }
App Name updated!
Icon updated!
Building...
(node:5860) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added. Use emitter.setMaxListeners() to increase limit
I: Using Apktool 2.4.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
build process exited with code 1
Build finished!
Sign apk
stderr: provided apk path or file '/home/satnam/AndroidStudioProjects/mywork/story app/dist/app.apk' does not exist
stderr: java.lang.IllegalArgumentException: provided apk path or file '/home/satnam/AndroidStudioProjects/mywork/story app/dist/app.apk' does not exist
stderr:
at at.favre.tools.apksigner.ui.FileArgParser.parseAndSortUniqueFilesNonRecursive(FileArgParser.java:38)
at at.favre.tools.apksigner.SignTool.execute(SignTool.java:63)
stderr:
at at.favre.tools.apksigner.SignTool.mainExecute(SignTool.java:48)
at at.favre.tools.apksigner.SignTool.main(SignTool.java:36)
stderr:
Cmd history for debugging purpose:
-----------------------
sign process exited with code 1
我也尝试过使用我自己的 nodejs 应用程序,但它给了我同样的错误。 我不知道该怎么做,我需要帮助构建它。我必须在大学提交 android 项目,但我对 nodejs 非常感兴趣,所以我想从 node 应用程序构建 android 应用程序。此外,如果您知道从节点应用程序构建 android 应用程序的任何其他方法,您可以建议我。提前致谢!
【问题讨论】:
-
嘿,你降级和测试了吗?
标签: javascript android node.js