tolu360 / cordova-plugin-paystack

This plugin allows to add Paystack Payments to your application using Paystack Native Mobile SDKs for Android & iOS
Other
34 stars 16 forks source link

Ionic app build fails with exception #7

Closed bot101 closed 7 years ago

bot101 commented 7 years ago
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:appcompat-v7:24.2.0.
     Searched in the following locations:
         https://repo1.maven.org/maven2/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
         https://repo1.maven.org/maven2/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
         https://dl.bintray.com/paystack/maven/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
         https://dl.bintray.com/paystack/maven/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
         https://oss.sonatype.org/content/repositories/snapshots/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
         https://oss.sonatype.org/content/repositories/snapshots/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
         file:/C:/Users/Ikenna/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
         file:/C:/Users/Ikenna/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
         file:/C:/Users/Ikenna/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
         file:/C:/Users/Ikenna/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
     Required by:
         :android:unspecified > co.paystack.android:paystack:2.0.1
   > Could not find com.android.support:appcompat-v7:24.2.0.
     Searched in the following locations:
         https://repo1.maven.org/maven2/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
         https://repo1.maven.org/maven2/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
         https://dl.bintray.com/paystack/maven/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
         https://dl.bintray.com/paystack/maven/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
         https://oss.sonatype.org/content/repositories/snapshots/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
         https://oss.sonatype.org/content/repositories/snapshots/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
         file:/C:/Users/Ikenna/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
         file:/C:/Users/Ikenna/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
         file:/C:/Users/Ikenna/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom
         file:/C:/Users/Ikenna/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.jar
     Required by:
         :android:unspecified > co.paystack.android:paystack:2.0.1 > me.philio:pinentryview:1.0.6

* 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: 2 mins 31.524 secs
Error: Error code 1 for command: cmd with args: /s,/c,"C:\Users\Ikenna\Desktop\bsms\bmsApp\bms\platforms\android\gradlew cdvBuildDebug -b C:\Users\Ikenna\Desktop\bsms\bmsApp\bms\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"

Building an Ionic app fails with the above errors. I tried to follow some of the links that could not be found in my browser and some were returning 404s and The requested path was not found.

Examples: https://repo1.maven.org/maven2/com/android/ exists but https://repo1.maven.org/maven2/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom returns a 404

https://dl.bintray.com/paystack/maven/co exists but https://dl.bintray.com/paystack/maven/com/android/support/appcompat-v7/24.2.0/appcompat-v7-24.2.0.pom returns The requested path was not found.

tolu360 commented 7 years ago

@bot101, it seems your build is failing because your android development environment does not fully meet the requirement for the library. Perhaps you do not have the Android Support Repository and Android Support Library installed in your environment.

You just need to update your Android APIs to at least v24 via the Android SDK Manager and you would be fine. Ensure you have the following config or above:

Android SDK Tools: 24+ Android SDK Platform-tools: 24+ Android SDK Build-tools: 24+ SDK Platform: 24+ Android Support Repository: 39+ Android Support Library: 23+

Run android on your terminal to access the Android SDK Manager

screen shot 2016-12-05 at 10 54 20 am

Make changes where appropriate and run cordova build android to recompile your app.

bot101 commented 7 years ago

Resolved issue. Only had to install Android support repository to get it to build successfully. Android support library was not listed in my Android SDK Manager. Thanks for the prompt response.