Build Android Error -- File Not Found: gradle-wrapper.properties

Hi,

I am trying build a android apk, and the these error come out when I follow these step to build:

  1. ionic platform add android
  2. ionic build android

Some background:

  1. Installed Android SDK
  2. Installed Gradle 3.3
  3. Installed Cordova

What did I try:

  1. Open Android studio and import my project to create a gradle-wrapper.properties

– It will create a gradle-wrapper.properties into the android\gradle\wrapper folder, however, after I execute ionic build android, the properties file will be deleted and the error is still here.

  1. Install different version of Android SDK
  2. Recreate the Project
  3. Reset all the environment PATH

I have no idea what is the problem is it. How can I fix it?

Thanks

I exactly have the same issue. The gradle-wrapper.properties gets deleted when you try to build it. Hope someone helps us out!

I fixed the problem. Check the Android sdk path and try to reinstall the apk.

After, I reinstalled the APK the problem solved.

Could you please give us more details how you fixed that problem?

You have to set the GRADLE_HOME variable or install android studio and not the standalone sdk

export CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL=https://services.gradle.org/distributions/gradle-5.1.1-all.zip