JinYazhou +

ionic云编译失败

出错信息:
ANDROID_HOME=/opt/android-sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: /opt/android-sdk/tools/templates/gradle/wrapper

莫名其妙问题,因为是云端编译,是服务器配置问题。暂时找到两种“解决方案”:
1、配置证书,不要用debug模式
keytool -genkey -v -keystore MY-RELEASE-KEY.keystore -alias MY_ALIAS_NAME -keyalg RSA -keysize 2048 -validity 10000
ionic package build android --profile MY_ALIAS_NAME --release

2、更新本地android/ios sdk版本
$ cordova platforms remove android
$ cordova platforms add android

最新评论