text: "use strict";(globalThis["webpackChunkquasar_dev"]=globalThis["webpackChunkquasar_dev"]||[]).push([[55776],{55776:(n,s,a)=>{a.r(s),a.d(s,{default:()=>Z});var t=a(83673);const o=(0,t._)("p",null,[(0,t.Uk)("当你用 Capacitor 模式开发移动应用程序时，你可以在你的Vue文件中访问"),(0,t._)("code",{class:"doc-token"},"$q.capacitor"),(0,t.Uk)("。这是对全局的"),(0,t._)("code",{class:"doc-token"},"Capacitor"),(0,t.Uk)("对象的别名。")],-1),c=(0,t.Uk)("如果你正在调试安卓应用程序，你可以通过连接到安卓手机/平板电脑的USB线使用 Google 浏览器"),e=(0,t.Uk)("远程调试"),p=(0,t.Uk)("。它也可以用于仿真器。"),k=(0,t._)("p",null,"这样，你就可以直接使用Chrome开发工具，在模拟器/手机/平板电脑上运行你的应用程序。检查元素，检查控制台输出，等等，等等。",-1),l=(0,t._)("p",null,[(0,t._)("img",{src:"https://cdn.quasar.dev/img/remote-debug.png",alt:"",title:"Android Remote Debugging",class:"doc-img"}),(0,t._)("img",{src:"https://cdn.quasar.dev/img/remote-debug-2.png",alt:"",title:"Android远程调试",class:"doc-img"})],-1),_=(0,t._)("p",null,"如果你在让Android构建完成时遇到问题，并且看到类似的信息。",-1),r=(0,t._)("pre",{class:"doc-code language-js"},[(0,t._)("code",{class:"doc-code__inner doc-code__inner--prerendered language-js"},[(0,t._)("span",{class:"token operator"},">"),(0,t.Uk)(" Failed to install the following Android "),(0,t._)("span",{class:"token constant"},"SDK"),(0,t.Uk)(" packages "),(0,t._)("span",{class:"token keyword"},"as"),(0,t.Uk)(" some licenses have not been accepted"),(0,t._)("span",{class:"token punctuation"},"."),(0,t.Uk)(),(0,t._)("span",{class:"token punctuation"},"("),(0,t.Uk)("由于某些许可未被接受，因此无法安装以下 Android "),(0,t._)("span",{class:"token constant"},"SDK"),(0,t.Uk)(" 包。"),(0,t._)("span",{class:"token punctuation"},")"),(0,t.Uk)("\n")])],-1),i=(0,t._)("p",null,"如果是这种情况，你需要接受所有的许可证。值得庆幸的是，有一个工具可以做到这一点。",-1),u=(0,t._)("ul",null,[(0,t._)("li",null,[(0,t.Uk)("Linux："),(0,t._)("code",{class:"doc-token"},"sdkmanager --licenses"),(0,t.Uk)("。")]),(0,t._)("li",null,[(0,t.Uk)("macOS: "),(0,t._)("code",{class:"doc-token"},"~ Library/Android/sdk/tools/bin/sdkmanager --licenses"),(0,t.Uk)("。")]),(0,t._)("li",null,[(0,t.Uk)("Windows: "),(0,t._)("code",{class:"doc-token"},"%ANDROID_SDK_ROOT%/tools/bin/sdkmanager --licenses"),(0,t.Uk)(".")])],-1),d=(0,t._)("div",{class:"doc-note doc-note--warning"},[(0,t._)("p",{class:"doc-note__title"},"WARNING"),(0,t._)("p",null,[(0,t.Uk)("环境变量"),(0,t._)("code",{class:"doc-token"},"ANDROID_HOME"),(0,t.Uk)("已被废弃，取而代之的是"),(0,t._)("code",{class:"doc-token"},"ANDROID_SDK_ROOT"),(0,t.Uk)("。根据你的Android Studio的版本，你可能需要一个或另一个。两者都设置也无妨。")])],-1),U=(0,t._)("p",null,"一些较新的基于Debian的操作系统(例如ubuntu，elementary OS)在你安装并(正确)配置了环境后，可能会让你看到 “找不到Android SDK”。",-1),g=(0,t._)("p",null,"这可能有两个不同的原因。通常情况下，路径配置不正确。第一步是验证你的路径设置是否正确。这可以通过运行以下命令来完成。",-1),S=(0,t._)("pre",{class:"doc-code language-bash"},[(0,t._)("code",{class:"doc-code__inner doc-code__inner--prerendered language-bash"},[(0,t.Uk)("$ "),(0,t._)("span",{class:"token builtin class-name"},"echo"),(0,t.Uk)(),(0,t._)("span",{class:"token variable"},"$ANDROID_HOME"),(0,t.Uk)("\n\n"),(0,t._)("span",{class:"token comment"},"# or"),(0,t.Uk)("\n\n$ "),(0,t._)("span",{class:"token builtin class-name"},"echo"),(0,t.Uk)(),(0,t._)("span",{class:"token variable"},"$ANDROID_SDK_ROOT"),(0,t.Uk)("\n\n")])],-1),T=(0,t._)("p",null,"预期的输出应该是一个类似于这个`$HOME/Android/Sdk’的路径。这样运行之后。",-1),b=(0,t._)("pre",{class:"doc-code language-bash"},[(0,t._)("code",{class:"doc-code__inner doc-code__inner--prerendered language-bash"},[(0,t.Uk)("$ "),(0,t._)("span",{class:"token function"},"ls"),(0,t.Uk)(" -la "),(0,t._)("span",{class:"token variable"},"$ANDROID_HOME"),(0,t.Uk)("\n\n"),(0,t._)("span",{class:"token comment"},"# or"),(0,t.Uk)("\n\n$ "),(0,t._)("span",{class:"token function"},"ls"),(0,t.Uk)(" -la "),(0,t._)("span",{class:"token variable"},"$ANDROID_SDK_ROOT"),(0,t.Uk)("\n")])],-1),m=(0,t._)("p",null,'要确保该文件夹包含SDK。预期的输出应该包含像 “工具”、“来源”、"平台-工具 "等文件夹。',-1),h=(0,t._)("pre",{class:"doc-code language-bash"},[(0,t._)("code",{class:"doc-code__inner doc-code__inner--prerendered language-bash"},[(0,t.Uk)("$ "),(0,t._)("span",{class:"token builtin class-name"},"echo"),(0,t.Uk)(),(0,t._)("span",{class:"token environment constant"},"$PATH"),(0,t.Uk)("\n")])],-1),E=(0,t._)("p",null,'输出应该包含Android SDK的 "工具 "文件夹和 "平台工具 "的每一个条目。这可能看起来像这样。',-1),M=(0,t._)("pre",{class:"doc-code language-bash"},[(0,t._)("code",{class:"doc-code__inner doc-code__inner--prerendered language-bash"},"/home/your_user/bin:/home/your_user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/your_user/Android/Sdk/tools:/home/your_user/Android/Sdk/platform-tools\n")],-1),A={class:"doc-note"},D=(0,t.Uk)("如果你确保了你的路径设置正确，但仍然得到了错误，你可以尝试以下修复。"),O=(0,t.Uk)('手动替换Android Studio的 "工具 "文件夹'),R=(0,t._)("p",null,[(0,t.Uk)("在Android Studio中(如果你在"),(0,t._)("code",{class:"doc-token"},"/src-capacitor/android"),(0,t.Uk)("上打开它)，你会看到一条信息，建议升级 Gradle 版本。"),(0,t._)("strong",null,"不要升级 Gradle"),(0,t.Uk)("，因为这将破坏Capacitor项目。其他要求的升级也是如此。")],-1),f=(0,t._)("p",null,[(0,t._)("img",{src:"https://cdn.quasar.dev/img/gradle-upgrade-notice.png",alt:"Gradle升级",class:"q-mb-md fit rounded-borders",style:{"max-width":"350px"}}),(0,t.Uk)("。")],-1),v=(0,t._)("p",null,"如果你遇到任何IDE错误，那么请点击文件>无效缓存并重新启动。",-1),B=(0,t._)("img",{src:"https://cdn.quasar.dev/img/gradle-invalidate-cache.png",alt:"Gradle upgrade",class:"fit rounded-borders",style:{"max-width":"350px"}},null,-1),V=(0,t._)("p",null,[(0,t.Uk)("当你试图在Android手机/平板电脑上直接运行你的应用程序时，可能会遇到"),(0,t._)("code",{class:"doc-token"},"?????? no permissions"),(0,t.Uk)("的问题。")],-1),Y=(0,t._)("p",null,"以下是你如何解决这个问题。",-1),C=(0,t._)("pre",{class:"doc-code language-bash"},[(0,t._)("code",{class:"doc-code__inner doc-code__inner--prerendered language-bash"},[(0,t._)("span",{class:"token comment"},"# create the .rules file and insert the content"),(0,t.Uk)("\n"),(0,t._)("span",{class:"token comment"},"# from below this example"),(0,t.Uk)("\n"),(0,t._)("span",{class:"token function"},"sudo"),(0,t.Uk)(),(0,t._)("span",{class:"token function"},"vim"),(0,t.Uk)(" /etc/udev/rules.d/51-android.rules\n"),(0,t._)("span",{class:"token function"},"sudo"),(0,t.Uk)(),(0,t._)("span",{class:"token function"},"chmod"),(0,t.Uk)(),(0,t._)("span",{class:"token number"},"644"),(0,t.Uk)("   /etc/udev/rules.d/51-android.rules\n"),(0,t._)("span",{class:"token function"},"sudo"),(0,t.Uk)(),(0,t._)("span",{class:"token function"},"chown"),(0,t.Uk)(" root. /etc/udev/rules.d/51-android.rules\n"),(0,t._)("span",{class:"token function"},"sudo"),(0,t.Uk)(),(0,t._)("span",{class:"token function"},"service"),(0,t.Uk)(" udev restart\n"),(0,t._)("span",{class:"token function"},"sudo"),(0,t.Uk)(),(0,t._)("span",{class:"token function"},"killall"),(0,t.Uk)(" adb\n")])],-1),y=(0,t._)("p",null,[(0,t._)("code",{class:"doc-token"},"51-android.rules"),(0,t.Uk)(" 的内容：")],-1),H=(0,t._)("pre",{class:"doc-code language-js"},[(0,t._)("code",{class:"doc-code__inner doc-code__inner--prerendered language-js"},[(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"0bb4"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"0e79"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"0502"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"0b05"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"413c"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"0489"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"091e"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"18d1"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"0bb4"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"12d1"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"24e3"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"2116"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"0482"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"17ef"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"1004"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"22b8"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"0409"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"2080"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"0955"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"2257"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"10a9"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"1d4d"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"0471"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"04da"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"05c6"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"1f53"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"04e8"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"04dd"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"0fce"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"0930"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"19d2"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n"),(0,t._)("span",{class:"token constant"},"SUBSYSTEM"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"usb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"ATTRS"),(0,t._)("span",{class:"token punctuation"},"{"),(0,t.Uk)("idVendor"),(0,t._)("span",{class:"token punctuation"},"}"),(0,t._)("span",{class:"token operator"},"=="),(0,t._)("span",{class:"token string"},'"1bbb"'),(0,t._)("span",{class:"token punctuation"},","),(0,t.Uk)(),(0,t._)("span",{class:"token constant"},"MODE"),(0,t._)("span",{class:"token operator"},"="),(0,t._)("span",{class:"token string"},'"0666"'),(0,t.Uk)("\n")])],-1),$=(0,t._)("p",null,[(0,t.Uk)("现在运行"),(0,t._)("code",{class:"doc-token"},"adb devices"),(0,t.Uk)("应该可以发现你的设备。")],-1),q=(0,t._)("p",null,"如果你正在调试iOS应用程序，你可以使用Safari开发者工具，通过连接到iOS手机/平板电脑的USB线进行远程调试。它也可以用于仿真器。",-1),w=(0,t._)("p",null,"这样你就可以直接使用Safari开发者工具来调试你在模拟器/手机/平板上运行的应用程序。检查元素，检查控制台输出，等等等等。",-1),K=(0,t._)("p",null,'首先在Safari的设置中启用 "开发者 "菜单选项。然后，如果你导航到 "开发者 "菜单选项，你会看到你的模拟器或连接的设备列在靠近顶部的位置。从这里你可以打开开发者工具。',-1),x=(0,t._)("p",null,"由于手机有状态栏和/或凹槽，在Capacitor上开发时，你的应用程序的风格可能需要进行一些调整。为了防止你的应用程序的部分内容进入状态栏后面，有一个全局CSS变量可以用来创建一个 “安全区域”。这个变量可以应用于你的应用程序的顶部和底部的填充或边距。",-1),N=(0,t._)("p",null,"Quasar 在QHeader/QFooter和Notify中默认支持这些CSS安全区域。然而，重要的是要经常在几个模型上检查你的Capacitor构建，看看你的应用程序的所有情况是否都正确地处理了安全区域。",-1),I=(0,t._)("p",null,"如果你需要手动调整你的CSS，你可以这样做。",-1),j=(0,t._)("pre",{class:"doc-code language-js"},[(0,t._)("code",{class:"doc-code__inner doc-code__inner--prerendered language-js"},[(0,t._)("span",{class:"token comment"},"// 为你的应用程序的标题"),(0,t.Uk)("\npadding"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("top"),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token function"},"constant"),(0,t._)("span",{class:"token punctuation"},"("),(0,t.Uk)("safe"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("area"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("inset"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("top"),(0,t._)("span",{class:"token punctuation"},")"),(0,t.Uk)(),(0,t._)("span",{class:"token comment"},"// for iOS 11.0"),(0,t.Uk)("\npadding"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("top"),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token function"},"env"),(0,t._)("span",{class:"token punctuation"},"("),(0,t.Uk)("safe"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("area"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("inset"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("top"),(0,t._)("span",{class:"token punctuation"},")"),(0,t.Uk)(),(0,t._)("span",{class:"token comment"},"// for iOS 11.2 +"),(0,t.Uk)("\n"),(0,t._)("span",{class:"token comment"},"// 用于你的应用程序的页脚"),(0,t.Uk)("\npadding"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("bottom"),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token function"},"constant"),(0,t._)("span",{class:"token punctuation"},"("),(0,t.Uk)("safe"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("area"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("inset"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("bottom"),(0,t._)("span",{class:"token punctuation"},")"),(0,t.Uk)("\npadding"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("bottom"),(0,t._)("span",{class:"token operator"},":"),(0,t.Uk)(),(0,t._)("span",{class:"token function"},"env"),(0,t._)("span",{class:"token punctuation"},"("),(0,t.Uk)("safe"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("area"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("inset"),(0,t._)("span",{class:"token operator"},"-"),(0,t.Uk)("bottom"),(0,t._)("span",{class:"token punctuation"},")"),(0,t.Uk)("\n")])],-1),G=(0,t._)("p",null,[(0,t.Uk)("当然，你也可以根据你的应用，用"),(0,t._)("code",{class:"doc-token"},"margin"),(0,t.Uk)("代替"),(0,t._)("code",{class:"doc-token"},"padding"),(0,t.Uk)("来使用上述示例。")],-1);function L(n,s,a,L,Q,W){const F=(0,t.up)("doc-link"),P=(0,t.up)("doc-page");return(0,t.wg)(),(0,t.j4)(P,{"meta-title":L.metaTitle,title:"Capacitor 的故障排除和提示",nav:L.nav,toc:L.toc,"meta-desc":L.metaDesc},{default:(0,t.w5)((()=>[(0,t._)("h2",{id:"$q-capacitor",class:"doc-heading doc-h2",onClick:s[0]||(s[0]=n=>L.copyHeading("$q-capacitor"))},"$q.capacitor"),o,(0,t._)("h2",{id:"android提示",class:"doc-heading doc-h2",onClick:s[1]||(s[1]=n=>L.copyHeading("android提示"))},"Android提示"),(0,t._)("h3",{id:"android远程调试",class:"doc-heading doc-h3",onClick:s[2]||(s[2]=n=>L.copyHeading("android远程调试"))},"Android远程调试"),(0,t._)("p",null,[c,(0,t.Wm)(F,{to:"https://developers.google.com/web/tools/chrome-devtools/debug/remote-debugging/remote-debugging?hl=en"},{default:(0,t.w5)((()=>[e])),_:1}),p]),k,l,(0,t._)("h3",{id:"接受许可证",class:"doc-heading doc-h3",onClick:s[3]||(s[3]=n=>L.copyHeading("接受许可证"))},"接受许可证"),_,r,i,u,(0,t._)("h3",{id:"安装sdk后未找到android-sdk",class:"doc-heading doc-h3",onClick:s[4]||(s[4]=n=>L.copyHeading("安装sdk后未找到android-sdk"))},"安装SDK后未找到Android SDK"),d,U,g,S,T,b,m,h,E,M,(0,t._)("blockquote",A,[(0,t._)("p",null,[D,(0,t.Wm)(F,{to:"https://github.com/meteor/meteor/issues/8464#issuecomment-288112504"},{default:(0,t.w5)((()=>[O])),_:1})])]),(0,t._)("h3",{id:"android-studio",class:"doc-heading doc-h3",onClick:s[5]||(s[5]=n=>L.copyHeading("android-studio"))},"Android Studio"),R,f,v,B,(0,t._)("h3",{id:"在linux上设置设备",class:"doc-heading doc-h3",onClick:s[6]||(s[6]=n=>L.copyHeading("在linux上设置设备"))},"在Linux上设置设备"),V,Y,C,y,H,$,(0,t._)("h2",{id:"ios提示",class:"doc-heading doc-h2",onClick:s[7]||(s[7]=n=>L.copyHeading("ios提示"))},"iOS提示"),(0,t._)("h3",{id:"ios远程调试",class:"doc-heading doc-h3",onClick:s[8]||(s[8]=n=>L.copyHeading("ios远程调试"))},"iOS远程调试"),q,w,K,(0,t._)("h3",{id:"状态栏和凹槽安全区域",class:"doc-heading doc-h3",onClick:s[9]||(s[9]=n=>L.copyHeading("状态栏和凹槽安全区域"))},"状态栏和凹槽安全区域"),x,N,I,j,G])),_:1},8,["meta-title","nav","toc","meta-desc"])}var Q=a(17536);const W={name:"DocMarkdownPage",setup(){return{metaTitle:"Capacitor 的故障排除和提示",metaDesc:"使用Capacitor的 Quasar 混合移动应用程序的技巧和窍门。",nav:[{name:"构建命令",category:"开发 Capacitor 应用程序",path:"/quasar-cli/developing-capacitor-apps/build-commands",dir:"left"},{name:"管理 Google Analytics",category:"开发 Capacitor 应用程序",path:"/quasar-cli/developing-capacitor-apps/managing-google-analytics",dir:"right"}],toc:[{id:"$q-capacitor",title:"$q.capacitor"},{id:"android提示",title:"Android提示"},{id:"android远程调试",title:"Android远程调试",sub:!0},{id:"接受许可证",title:"接受许可证",sub:!0},{id:"安装sdk后未找到android-sdk",title:"安装SDK后未找到Android SDK",sub:!0},{id:"android-studio",title:"Android Studio",sub:!0},{id:"在linux上设置设备",title:"在Linux上设置设备",sub:!0},{id:"ios提示",title:"iOS提示"},{id:"ios远程调试",title:"iOS远程调试",sub:!0},{id:"状态栏和凹槽安全区域",title:"状态栏和凹槽安全区域",sub:!0}],copyHeading:Q.Et}}};var F=a(74260);const P=(0,F.Z)(W,[["render",L]]),Z=P}}]);