Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

ionic build android error #949

Closed
harishkesari opened this issue Jun 1, 2016 · 6 comments
Closed

ionic build android error #949

harishkesari opened this issue Jun 1, 2016 · 6 comments

Comments

@harishkesari
Copy link

when building the application by "ionic platform add android" the application throws an error.

D:\ionic Practice\void\test push\pushTest>cordova plugin list
cordova-plugin-console 1.0.3 "Console"
cordova-plugin-device 1.1.2 "Device"
cordova-plugin-facebook4 1.7.1 "Facebook Connect"
cordova-plugin-splashscreen 3.1.0 "Splashscreen"
cordova-plugin-statusbar 2.1.3 "StatusBar"
cordova-plugin-whitelist 1.2.2 "Whitelist"
ionic-plugin-keyboard 2.2.0 "Keyboard"
phonegap-plugin-push 1.6.4 "PushPlugin"

D:\ionic Practice\void\test push\pushTest>ionic build android
Running command: "C:\Program Files (x86)\nodejs\node.exe" "D:\ionic Practice\void\test push\pushTest\hooks\after_prepare\010_add_platform_class.js" "D:\ionic Practice\void\test pus
add to body class: platform-android
ANDROID_HOME=D:\Ionic\adt-bundle-windows-x86-20140702\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_65

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project 'android'.

    Could not resolve all dependencies for configuration ':_debugCompile'.
    Could not find com.android.support:support-v4:23.4.0.
    Searched in the following locations:
    https://repo1.maven.org/maven2/com/android/support/support-v4/23.4.0/support-v4-23.4.0.pom
    https://repo1.maven.org/maven2/com/android/support/support-v4/23.4.0/support-v4-23.4.0.jar
    file:/D:/Ionic/adt-bundle-windows-x86-20140702/sdk/extras/android/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.pom
    file:/D:/Ionic/adt-bundle-windows-x86-20140702/sdk/extras/android/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.jar
    file:/D:/Ionic/adt-bundle-windows-x86-20140702/sdk/extras/google/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.pom
    file:/D:/Ionic/adt-bundle-windows-x86-20140702/sdk/extras/google/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.jar
    Required by:
    :android:unspecified > com.facebook.android:facebook-android-sdk:4.8.2
    Could not find com.android.support:support-v4:23.4.0.
    Searched in the following locations:
    https://repo1.maven.org/maven2/com/android/support/support-v4/23.4.0/support-v4-23.4.0.pom
    https://repo1.maven.org/maven2/com/android/support/support-v4/23.4.0/support-v4-23.4.0.jar
    file:/D:/Ionic/adt-bundle-windows-x86-20140702/sdk/extras/android/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.pom
    file:/D:/Ionic/adt-bundle-windows-x86-20140702/sdk/extras/android/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.jar
    file:/D:/Ionic/adt-bundle-windows-x86-20140702/sdk/extras/google/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.pom
    file:/D:/Ionic/adt-bundle-windows-x86-20140702/sdk/extras/google/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.jar
    Required by:
    :android:unspecified > com.android.support:support-v13:23.3.0
    Could not find com.android.support:support-v4:23.4.0.
    Searched in the following locations:
    https://repo1.maven.org/maven2/com/android/support/support-v4/23.4.0/support-v4-23.4.0.pom
    https://repo1.maven.org/maven2/com/android/support/support-v4/23.4.0/support-v4-23.4.0.jar
    file:/D:/Ionic/adt-bundle-windows-x86-20140702/sdk/extras/android/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.pom
    file:/D:/Ionic/adt-bundle-windows-x86-20140702/sdk/extras/android/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.jar
    file:/D:/Ionic/adt-bundle-windows-x86-20140702/sdk/extras/google/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.pom
    file:/D:/Ionic/adt-bundle-windows-x86-20140702/sdk/extras/google/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.jar
    Required by:
    :android:unspecified > com.google.android.gms:play-services-gcm:9.0.1 > com.google.android.gms:play-services-basement:9.0.1

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

BUILD FAILED

Total time: 6.376 secs
ERROR building one of the platforms: Error code 1 for command: cmd with args: /s,/c,""D:\ionic Practice\void\test push\pushTest\platforms\android\gradlew" cdvBuildDebug -b "D:\ioni
rg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
You may not have the required environment or OS to build this project
Error: Error code 1 for command: cmd with args: /s,/c,""D:\ionic Practice\void\test push\pushTest\platforms\android\gradlew" cdvBuildDebug -b "D:\ionic Practice\void\test push\push
d.useDeprecatedNdk=true"

@Davids89
Copy link

Davids89 commented Jun 1, 2016

Sometimes the solution is

ionic platform remove android
ionic platform add android

@harishkesari
Copy link
Author

i tried by adding and removing platform and plugin multiple times. It throws the same issue..

@macdonst
Copy link
Member

macdonst commented Jun 1, 2016

@avsekhar88 see issue #909. Because of a Google screw up we had to pin the v4 support library to 23.4.0 so you'll need to ensure you have that version of the library.

@fredgalvao
Copy link
Collaborator

Or just read the docs carefully.

@macdonst
Copy link
Member

I published 1.7.1 that no longer pins the v13 support library to 23.4.0 as Google has fixed the issue in Play Services.

@lock
Copy link

lock bot commented Jun 4, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants