导入Android Studio
File --> Open --> 选择platforms-android下的build.gradle
cordova build android中问题
cordova升级7.0后,运行
ionic build android 或者
cordova build android 报出错误
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 Studio
需要下载并安装gradle:gradle-x.x-bin.zip
gradle地址:(https://services.gradle.org/distributions)
安装后添加环境变量路径:
1 Gradle_path = D:softgradle-4.12 PATH=%GRADLE_HOME%in;
注意: gradle-4.1要求jdk在7.0以上
测试: gradle -v
重新cmd打开命令窗口。
执行:ionic build android
Corodva Could not resolve com.android.tools.build:gradle:3.0.0 解决方法:
网络问题,将 android/build.gradle
android/app/build.gradle
android/CordovaLib/build.gradle
中 的所有 repositories
改为
repositories { jcenter() maven { url "http://maven.aliyun.com/nexus/content/groups/public/" } }