我目前正在开发一个跨平台应用程序。我正在使用 Quasar & Vue 和 Capacitor。我的应用程序在桌面上运行良好,并且正在构建“良好”。但是当我想在手机(或 Android 模拟器)中安装它时,它显示“应用程序未安装的包似乎无效”。
这是构建日志:
PS C:\Users\me\Documents\u\voyo-spa> quasar build -m capacitor -T android
.d88888b.
d88P" "Y88b
888 888
888 888 888 888 8888b. .d8888b 8888b. 888d888
888 888 888 888 "88b 88K "88b 888P"
888 Y8b 888 888 888 .d888888 "Y8888b. .d888888 888
Y88b.Y8b88P Y88b 888 888 888 X88 888 888 888
"Y888888" "Y88888 "Y888888 88888P' "Y888888 888
Y8b
Build mode............. capacitor
Pkg quasar............. v2.14.3
Pkg @quasar/app-vite... v1.7.3
Pkg vite............... v2.9.17
Debugging.............. no
Publishing............. no
Packaging mode......... gradle
App • WAIT • Compiling of Capacitor UI with Vite in progress...
App • DONE • Capacitor UI compiled with success • 6446ms
UI files build summary:
╔══════════════════════════════════════╤═══════════╗
║ Asset │ Size ║
╟──────────────────────────────────────┼───────────╢
║ assets/api.a6511b54.js │ 0.57 KB ║
║ assets/axios.15eb79b5.js │ 0.24 KB ║
║ assets/axios.6b484fa5.js │ 29.25 KB ║
║ assets/ContactsPage.a77d4f30.js │ 0.38 KB ║
║ assets/CreateVisit.0ae386a3.js │ 2.65 KB ║
║ assets/ErrorNotFound.92c9e1e2.js │ 0.53 KB ║
║ assets/ForgottenPassword.0522cb9f.js │ 2.13 KB ║
║ assets/HomePage.da1f2c94.js │ 3.77 KB ║
║ assets/i18n.a47aece6.js │ 47.56 KB ║
║ assets/index.2f452545.js │ 115.02 KB ║
║ assets/LoginPage.eb20bc0a.js │ 5.09 KB ║
║ assets/ProfilPage.cd1cf1eb.js │ 2.49 KB ║
║ assets/QBtn.e998e959.js │ 16.27 KB ║
║ assets/QCard.c0beb4e5.js │ 1.14 KB ║
║ assets/QInput.4a7d5195.js │ 25.33 KB ║
║ assets/RegisterPage.35cc7392.js │ 1.93 KB ║
║ assets/rules.6f86d38b.js │ 2.75 KB ║
║ assets/ToolBarComponent.88d69250.js │ 25.39 KB ║
║ assets/web.f4c3ae26.js │ 0.66 KB ║
╟──────────────────────────────────────┼───────────╢
║ assets/index.c9c1fd31.css │ 197.21 KB ║
║ assets/LoginPage.8b133043.css │ 0.08 KB ║
╟──────────────────────────────────────┼───────────╢
║ index.html │ 0.59 KB ║
╚══════════════════════════════════════╧═══════════╝
App • Updated src-capacitor/package.json
App • Updated capacitor.config.json
App • Running "C:\Users\me\Documents\u\voyo-spa\src-capacitor\node_modules\@capacitor\cli\bin\capacitor sync android" in C:\Users\me\Documents\u\voyo-spa\src-capacitor
√ Copying web assets from www to android\app\src\main\assets\public in 351.45ms
√ Creating capacitor.config.json in android\app\src\main\assets in 10.62ms
√ copy android in 401.83ms
√ Updating Android plugins in 2.22ms
[info] Found 1 Capacitor plugin for android:
@capacitor/[email protected]
√ update android in 682.92ms
[info] Sync finished in 1.101s
App • Updated capacitor.config.json
App • Building Android app...
App • [sync] Running "./gradlew.bat assembleRelease" in C:\Users\me\Documents\u\voyo-spa\src-capacitor\android
> Configure project :app
WARNING: Using flatDir should be avoided because it doesn't support any meta-data formats.
> Configure project :capacitor-cordova-android-plugins
WARNING: Using flatDir should be avoided because it doesn't support any meta-data formats.
BUILD SUCCESSFUL in 9s
133 actionable tasks: 30 executed, 103 up-to-date
Build succeeded
Build mode............. capacitor
Pkg quasar............. v2.14.3
Pkg @quasar/app-vite... v1.7.3
Pkg vite............... v2.9.17
Debugging.............. no
Publishing............. no
Packaging mode......... gradle
Browser target......... es2019|edge88|firefox78|chrome87|safari13.1
=======================
Output folder.......... C:\Users\me\Documents\u\voyo-spa\dist\capacitor
Tip: "src-capacitor" is a Capacitor project folder, so everything you know
about Capacitor applies to it. Quasar CLI generates the UI content
for "src-capacitor/www" folder and then either opens the IDE or calls
the platform's build commands to generate the final packaged file.
Tip: Feel free to use Capacitor CLI ("yarn capacitor <params>" or
"npx capacitor <params>") or change any files in "src-capacitor", except
for the "www" folder which must be built by Quasar CLI.
我已经尝试删除应用程序并重建它,更改安装设备和Android版本11和MIUI14(Android 13)。 有谁知道它可能来自哪里或有安装它的想法吗?
编辑:我还尝试卸载并安装我的 java/capacitor/gradle 并从头开始重做一个项目。还是同样的错误。
我找到了解决这个问题的方法。我已经签署了该应用程序,现在可以毫无问题地安装它。 不知道为什么我之前可以安装~