Gradle Build issue. Ionic 4

I am facing Gradle Build Issue in ionic cordova build android --prod, please help

Yesterday my code works fine, but now I have the Issue!
I have not updated anything. I don´t understand.

BUILD FAILED in 50s
D:\Ionic 4\Ionic4proj\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    Could not resolve all files for configuration ‘:app:debugCompileClasspath’.

Could not resolve com.android.support:support-v4:27.+.
Required by:
project :app
Failed to list versions for com.android.support:support-v4.
Unable to load Maven meta-data from https://jcenter.bintray.com/com/android/support/support-v4/maven-metadata.xml.
Could not get resource ‘https://jcenter.bintray.com/com/android/support/support-v4/maven-metadata.xml’.
Could not GET ‘https://jcenter.bintray.com/com/android/support/support-v4/maven-metadata.xml’. Received status code 504 from server: Gateway Time-out
Could not resolve com.android.support:support-annotations:27.+.
Required by:
project :app
Skipped due to earlier error
Skipped due to earlier error
Skipped due to earlier error
Skipped due to earlier error

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 50s
[ERROR] An error occurred while running subprocess cordova.

    cordova.cmd build android exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.

Hi , have you find the solution. I am also facing same problem.

I do not know why, but this problem stopped at some moment.

most likely your network is not allowing access to apache.org
https://stackoverflow.com/questions/55177876/ionic-4-could-not-resolve-all-files-for-configuration-appdebugcompileclasspa

Hi, can you please change gradle version?
Version: 3.0.1