gpt4 book ai didi

javascript - 未使用 androidjs 构建 Apk 文件

转载 作者:太空宇宙 更新时间:2023-11-04 01:28:47 27 4
gpt4 key购买 nike

我正在学习使用 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应用程序。此外,如果您知道从 Node 应用程序构建Android应用程序的任何其他方法,您可以建议我。提前致谢!

最佳答案

他们目前似乎有一个 issue

Maybe there are some issues in androidjs-builder@1.0.7.

We'll fix this issues ASAP, For now you can downgrade to older version 1.0.6 follow these steps:

npm uninstall -g androidjs-builder

npm install -g androidjs-builder@1.0.6

<小时/>

我刚刚测试了他们的入门示例,它已经成功 (androidjs-builder@1.0.6)

关于javascript - 未使用 androidjs 构建 Apk 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56697748/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com