ionic build is getting failed for ionic cordova build android

24 Views Asked by At

i'm new to the ionic and i do't understand the cause of the issue here. i'm trying to run the existing code and getting the following error. Please help me understand the possible cause and the solution for it

console log screenshot

Wrote out android application name "APO eLearning" to /home/sonal/Desktop/ahom/ionic/eapo/platforms/android/app/src/main/res/values/strings.xml
Wrote out Android package name "com.moodle.moodlemobile" to /home/sonal/Desktop/ahom/ionic/eapo/platforms/android/app/src/main/java/com/moodle/moodlemobile/MainActivity.java
Updating icons at platforms/android/app/src/main/res
Updating splash screens at platforms/android/app/src/main/res
Updating resource files at platforms/android
Prepared android project successfully
Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes
Executing script found in plugin cordova-android-support-gradle-release for hook "after_prepare": plugins/cordova-android-support-gradle-release/scripts/apply-changes.js
cordova-android-support-gradle-release: Android platform: V7+
cordova-android-support-gradle-release: Wrote custom version '27.+' to /home/sonal/Desktop/ahom/ionic/eapo/platforms/android/app/build.gradle
cordova-android-support-gradle-release: Wrote custom version '27.+' to /home/sonal/Desktop/ahom/ionic/eapo/platforms/android/cordova-android-support-gradle-release/moodlemobile-cordova-android-support-gradle-release.gradle
No scripts found for hook "before_compile".
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=/home/sonal/Android/Sdk (recommended setting)
ANDROID_HOME=/home/sonal/Android/Sdk (DEPRECATED)
Using Android SDK: /home/sonal/Android/Sdk

FAILURE: Build failed with an exception.

* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type PluginResolutionStrategyInternal using BuildScopeServices.createPluginResolutionStrategy().

* 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 0s
Command failed with exit code 1: /usr/share/gradle/bin/gradle -p /home/sonal/Desktop/ahom/ionic/eapo/platforms/android wrapper -b /home/sonal/Desktop/ahom/ionic/eapo/platforms/android/wrapper.gradle
Error: Command failed with exit code 1: /usr/share/gradle/bin/gradle -p /home/sonal/Desktop/ahom/ionic/eapo/platforms/android wrapper -b /home/sonal/Desktop/ahom/ionic/eapo/platforms/android/wrapper.gradle
    at makeError (/home/sonal/Desktop/ahom/ionic/eapo/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/home/sonal/Desktop/ahom/ionic/eapo/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
[ERROR] An error occurred while running subprocess cordova.
        
        cordova build android --verbose exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.
  ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
  ionic:utils-process onBeforeExit handler: running 3 functions +0ms
  ionic:utils-process processExit: exiting (exit code: 1) +21ms

thanks for the solution in advance

0

There are 0 best solutions below