Cordova / Ionic build error (sometimes): don't have required environment

前端 未结 3 1255

I have just started dabbling in Cordova / Ionic to make Android / iOS apps with HTML5 / js, and so far I have gotten sample / tutorial apps to work sometimes, but not every

相关标签:
3条回答
  • 2020-12-06 18:35

    I have solved this problem by having the correct version of the build tools too (not only the SDK platform).

    If ionic sets the platform target to android-21 (see console log when adding the platform), install the build tools 21.x.x also.

    0 讨论(0)
  • 2020-12-06 18:38

    I was facing the same issue, but fixed the issue by installed Android5.0.1(Api21) through sdk manager.

    0 讨论(0)
  • 2020-12-06 18:42

    Copy and paste this to your environment variable path:

    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

    Then open Android Studio or Eclipse and make a rebuild to some project into the environment and try to build your Cordova project. Hope it will help. That solved the problem for me.

    0 讨论(0)
提交回复
热议问题