用chrome進行調試:html
https://jingyan.baidu.com/album/db55b609fde96d4ba30a2fa9.html?picindex=8android
http://rensanning.iteye.com/blog/2018417chrome
======華麗麗的分割線======windows
[Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually. Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to incl de path to valid SDK directory.] ERROR building one of the platforms: Error: cmd: Command failed with exit codeapp
安裝 android sdk,在 環境變量 -> 系統變量 中分別加入:gradle
ANDROID_HOME=E:\Program Files\adt-bundle-windows-x86_64-20131030\sdk ui
PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-toolsspa
======華麗麗的分割線======.net
Error: Could not find an installed version of Gradle either in Android Studio, or on your system to install the gradle wrapper. Please include gradle in your path, or install Android Studiodebug
下載 gradle-4.1,解壓到任意文件夾,在 環境變量 -> 系統變量 中的 Path 加入對應文件夾的位置,如:C:\gradle-4.1\bin\。
======華麗麗的分割線======
[Android SDK Platform 25].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager. Alternatively, to learn how to transfer the license agreements from one workstation to another, go t
o http://d.android.com/r/studio-ui/export-licenses.html
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more l og output.
參考 http://blog.csdn.net/xlyrh/article/details/54667633
手動建立 licenses, 如今ANDROID_HOME文件夾下建立 licenses 文件夾,而後建立名爲 android-sdk-licenses.txt 文件,寫入 8933bad161af4178b1185d1a37fbf41ea5269c55,再去掉文件擴展名。
======華麗麗的分割線======
BUILD SUCCESSFUL in 26s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Downloading https://services.gradle.org/distributions/gradle-3.3-all.zip
遇到這個一直下載不下來,下載不下來,下載不下來,就別等了,把它該成本地的就行了。
找到文件 ...\platforms\android\cordova\lib\builders\GradleBuilder.js
202行,將 ‘https\\://services.gradle.org/distributions/gradle-3.3-all.zip’ 修改成 ‘file:///C:\Users\MikeJia\Desktop\personal\cordova’
======華麗麗的分割線======
codova run android 不能正常啓動安卓模擬器
若是以前同時安裝過 visual studio 和 android studio ,那麼系統可能存在兩個安卓模擬器。須要手動修改環境變量,指向可用的 android sdk
======華麗麗的分割線======