Cordova gradle wrapper missing in android sdk

江枫思渺然 提交于 2019-12-03 06:48:59

If still not working then copy all file from gradle\wrapper from Android Studio installation folder

C:\Program Files\Android\Android Studio\plugins\android\lib\templates\gradle\wrapper

and paste it in your Android SDK gradle\wrapper then run same command.

E:\android-sdk\tools\templates\gradle\wrapper

This is a known issue; see CB-12544. For now you'll need to downgrade.

I downloaded Android SDK r25 manually and placed templates folder inside Android/sdk/tools. This solved the issue for me. You can get it from https://dl.google.com/android/repository/tools_r25.2.3-macosx.zip

For Windows:

https://developer.android.com/studio/index.html

Go to the section :"Get just the command line tools"

There is a link 'sdk-tools-darwin-3859397.zip' for Mac, Unfortunately that didn't have the templates folder with Gradle Wrapper. So for Mac users, i will suggest not to go for this zip.

When you develop apps with Cordova and Microsoft Visual Studio there are some important facts you should know. I learned these things over 2.5 years of period.

  1. Visual Studio tools for apache cordova is Microsoft product and it's not updated alongside with other tools using by app developers.

Android SDK - Updating Regularly X-Code - Updating Regularly ( I would recommend not to use windows based tools to publish your app to apple store. please follow this to learn how to publish your app to apple store without using remote debugging tools. https://guntucomputerhacks.blogspot.com/2016/11/visual-studio-2015-cordova-remotebuild.html ) Cordova and Plugins - There is a big version gap between microsoft tools for Cordova.

So lets focus on this graddle issue. The latest android version released in 2018 is android 8.0 and 8.1 Oreo . But unfortunately microsoft tools for apache cordova is still supporting Android 7.1 - Nougat.

So in case you have updated your android SDK and tools you might need to rollback that update to use Microsoft tools to build and release your app to Google Play.

But again try to keep Visual Studio for development tasks and always try to native tool set for release purposes.

Please visit my blog for more apache cordova tips.

https://guntucomputerhacks.blogspot.com

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!