ionic打包报错Could not find an installed version of Gradle either in Android Studio

  • A+
所属分类:cordova ionic

ionic cordova build android打包时报以下错误

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没有配置,一看有配置啊.上网搜了一大堆,说的云里雾里的..闹了半天还是没解决问题.
最后才发现,原来如此简单,

*重要的事情说三遍! *
关机重启! 关机重启! 关机重启!
最后完美解决了这个问题.

小技巧:
在构建app的时候,如果不知道自己还需要哪些组件没有配置.可以在cmd命令行输入以下命令:

cordova -requirements

ZPY

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: