Ionic cordova build android error mistake

ı can prepare android app with ionic cordova prepare android but when ı type ionic cordova build android it says BUİLD FAILED in 2m 25s
/home/deniz/Masaüstü/masaüstü/istatistikyazılımı/apache cordova/ionicdeneme/myApp/platforms/android/gradlew: Command failed with exit code 1 Error output:
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/home/deniz/Masaüstü/masaüstü/istatistikyazılımı/apache cordova/ionicdeneme/myApp/platforms/android/CordovaLib/build.gradle’ line: 41

  • What went wrong:
    A problem occurred evaluating project ‘:CordovaLib’.

Failed to apply plugin [id ‘com.github.dcendents.android-maven’]
Configuration with name ‘testImplementation’ not found.

  • 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

BUİLD FAILED in 2m 25s
[ERROR] An error occurred while running subprocess cordova.

    cordova build android exited with exit code 1.
    
    Re-running this command with the --verbose flag may provide more information.

ionic version -v :5.2.8
cordova -v :9.0.0 (cordova-lib@9.0.1)
gradle -v :Gradle 5.6.2

Remove your gradle and reinstall…

If don’t work, verify your environment variables!

1 Like

when ı export CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL=http://services.gradle.org/distributions/gradle-4.1-all.zip compiler says :* What went wrong:
Could not determine java version from ‘11.0.4’.
please gave me ,gradle ,ionic ,npm,… versions
environment variables
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=/home/deniz/Android/Sdk/ (recommended setting)
ANDROID_HOME=/home/deniz/Android/Sdk (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app

Hi i am also facing the same issue,