1. 安装cordova
参考:vue+cordova移动端Android开发环境配置_u012211003的博客-CSDN博客
2. 安装java jdk
参考:vue+cordova移动端Android开发环境配置_u012211003的博客-CSDN博客
3. 安装Android Studio
参考:Android Studio下载、安装和配置+SDK+tools下载(无敌超级详细版本)_WonderKing'blog-CSDN博客_android studio安装sdk
4. 环境Android环境变量配置
参考:Android配置环境变量_wuqingsen1的博客-CSDN博客_android配置环境变量
5.创建App
6.安装gradle支持打包
参考:ionic3打包出错ionic cordova build android(系列一):could not find an installed version of gradle either in android studio - 程序猿小范 - 博客园
踩坑:
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=undefined (DEP
https://blog.csdn.net/liwan09/article/details/106981563Could not find an installed version of Gradle either in Android Studio,or on your system to install the gradle wrapper. Please include gradlein your path, or install Android Studio
Error: Could not find an installed version of Gradle either in Android Studio_bluefish_flying的博客-CSDN博客
真机调试报错
Failed to execute shell command "input,keyevent,82" on device: Error: Command failed with exit code 1: adb -s b60214f7 shell input keyevent 82
java.lang.SecurityException: Injecting to another application requires INJECT_EVENTS permission
在开发者模式下,设置USB调试(安全设置),允许通过USB调试修改权限或模拟点击