Android Production Release Error


#1

Main error - app:debugAndroidTestRuntimeClasspath

Info

cli packages: (C:\Users\Cedrick\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v6.11.0
    npm               : 3.10.10
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\Cedrick\AppData\Local\Android\sdk

Misc:

    backend : pro

The error

:app:lintVitalRelease
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugAndroidTestRuntimeClasspath'.
   > Could not find support-fragment.aar (com.android.support:support-fragment:27.1.1).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/support/support-fragment/27.1.1/support-fragment-27.1.1.aar
   > Could not find support-core-ui.aar (com.android.support:support-core-ui:27.1.1).

46 actionable tasks: 17 executed, 29 up-to-date
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/support/support-core-ui/27.1.1/support-core-ui-27.1.1.aar
   > Could not find support-annotations.jar (com.android.support:support-annotations:27.1.1).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/support/support-annotations/27.1.1/support-annotations-27.1.1.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

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

BUILD FAILED in 1m 15s
(node:33416) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugAndroidTestRuntimeClasspath'.
   > Could not find support-fragment.aar (com.android.support:support-fragment:27.1.1).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/support/support-fragment/27.1.1/support-fragment-27.1.1.aar
   > Could not find support-core-ui.aar (com.android.support:support-core-ui:27.1.1).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/support/support-core-ui/27.1.1/support-core-ui-27.1.1.aar
   > Could not find support-annotations.jar (com.android.support:support-annotations:27.1.1).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/support/support-annotations/27.1.1/support-annotations-27.1.1.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

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

BUILD FAILED in 1m 15s

Please help as I need to go live my app.

Thanks


#2

Same problem!!!


#3

Try to remove platform and re add platform and run the application.


#4

I fixed it already. In platform > android > build.gradle under repository tag. Put jcenter() below the maven tag. It fixed my error


#5

Thank you! You saved my day!