Interswitch Payment dependency issue - android

I have downloaded the Interswitch source code from here.
v0.0.8-alpha: Merge pull request #27 from techquest/babajide_dev.
While I execute this,I am receiving the error message even in default pack. In official site they instructed us to use the following dependencies.
repositories {
maven {
url 'http://dl.bintray.com/techquest/maven-repo'
}
}
dependencies{
compile 'com.interswitchng:payment-android:0.0.6'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
}
Even I used in my current code and instead of this compile 'com.interswitchng:payment-android:0.0.6' default interswith SDK has the follwing compile 'com.interswitchng:payment-android:0.0.12-Beta' . While I changed & executed the updated dependency of Interswitch I am getting the error

Make sure you have followed the steps listed on their Git Repo to the latter.
I'd recommend creating a new project and testing this.

Related

Android recyclerview dependency display error

This is very default setting, first I create a dummy project, then click add recyclerview, then I click at recyclerview menu, the Android studio prompt to add the library, then I accept.
I click at okay, the dependency than update as following:
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:recyclerview-v7:25.3.1'
and the error message as this
please be remind I use default android studio
you need to use the same version for support libraries.
either use 25.3.1 for both support libraries or use 26.0.0 for both support libraries.
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
hope this will help you.
Please make sure that all the support libraries you are using are of the same version and major version has to match compile SDK version.
As you yourself mentioned adding Google's Maven Repository solves the problem. For others,
The most recent versions of the following Android libraries are
available from Google's Maven repository:
Add them like this:
repositories {
maven {
url 'https://maven.google.com'
// Alternative URL is 'https://dl.google.com/dl/android/maven2/'
}
}

Failed to resolve: com.onesignal:OneSignal:3.4.3

I'm trying to setup OneSignal push notifocation in my Android app. I have changed my build.gradle to include the required dependencies (or so I think).
No matter what I do I keep getting
Failed to resolve: com.onesignal:OneSignal:3.4.3
or
Could not find com.onesignal:OneSignal:3.4.3
Can anyone give me a slight push please? Thanks in advance :-)
I should mention that I have checked the trouble shooting section on OneSignals home page. All is in order.
Here's the dependencies section of my gradle file:
dependencies {
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.google.firebase:firebase-analytics:9.6.0'
compile 'com.google.firebase:firebase-crash:9.6.0'
compile files('src/main/libs/simple-xml-2.7.jar')
compile files('src/main/libs/date4j.jar')
compile files('src/main/libs/picasso-2.5.2.jar')
compile 'com.onesignal:OneSignal:3.4.3#aar'
compile 'com.google.android.gms:play-services-gcm:10.0.1'
compile 'com.google.android.gms:play-services-location:10.0.1'
}
The OneSignal SDK is hosted on Maven Central so I would first make sure you can access this from your system. Next double check the following as well.
Make sure you're using Android Studio version 1.4.0 or newer.
Go to File>Settings. Search for Offline work and uncheck that option.
Add the following to your .gradle file.
Root build.gradle
repositories {
mavenCentral()
}
4. Try restarting Android Studio and then going to Tool>Android>Sync Project again.
5.Try building OneSignal's example Android Studio project. If this works then the problems is related to your project.
Screenshots for some of these steps below.
https://documentation.onesignal.com/docs/troubleshooting-android
Well... what finally fixed this issue for me was to replace
mavenCentral()
with
jcenter()
go figure... :-)

How to compile from a github repository from Intellij in the build.gradle file?

Let's pretend that I have a github repository at github.com/myprojects/myrepo
Let's also pretend that I have a project in IntelliJ with a build.gradle file that contains the following:
dependencies {
// android
compile 'com.android.support:appcompat-v7:21.0.0'
// google play services
compile 'com.google.android.gms:play-services:6.1.71'
}
I want to add my github project via Gradle so I imagine that the dependencies need to add something like:
compile 'github.com:myprojects:myrepo'
This obviously isn't how it works though since I get "Failed to resolve com.github:myprojects:myrepo
Actual examples which work:
compile 'com.github.satyan:sugar:1.3'
compile 'com.github.castorflex.smoothprogressbar:library:x.x.x'
Since I don't want to clone the repository into a libs folder, how can I add a compile command in the dependencies portion of my build.gradle file to compile from github so that I can simply add something like the following:
compile 'com.github.myprojects:myrepo'
compile 'com.github.castorflex.smoothprogressbar:library:x.x.x'
It works because this library is published in Central Maven.
compile 'github.com:myprojects:myrepo'
This obviously isn't how it works though since I get "Failed to resolve >com.github:myprojects:myrepo
It is not enough to push on github.
You have to publish you artifact on Central Maven or JCenter or a local maven. You can find some guides to publish on jcenter, for example this.

How to integrate MoPub inside a shared library in Android Studio

I need to integrate MoPub inside an android library shared by 3 different games.
I tried to use the fabric plugin with no success... after some attempts I get this error:
Error:Failed to resolve: com.mopub.volley:mopub-volley:1.1.0
Then I also tried to follow this guide that you can find here (https://github.com/mopub/mopub-android-sdk/wiki/Getting-Started) but I always get some errors (I can't execute the gradle command via terminal or I get the same error as mentioned above).
Can someone help me?
Thank you,
Mirko
UPDATE
Thanks to #Edward I was able to import correctly mopub-sdk in my project.
In order to fix the mopub-volley error, first clean the solution, read which files are missing in the console, look at the path, recreate the indicated path and add mopub-volley-1.1.0.jar, mopub-volley-1.1.0.pom in that folder.
Rebuild and you are ready to go!
In my case, mopub-sdk was looking for the mopub-volley lib inside an
inexistent folder in the same path of the android sdk.
If you get another error related to the millenial sdk, add this line in the dependencies section of the build.gradle file inside the mopub-sdk library:
compile fileTree(dir: 'libs', include: ['*.jar'])
you should get something like this:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:22.0.0'
compile 'com.android.support:support-annotations:22.0.0'
compile 'com.mopub.volley:mopub-volley:1.1.0'
}
Hope this can help you!
Go download the MoPub SDK.
Unzip and you will get a mopub-sdk folder
Navigate to your ‘Project location’, go into your project folder, and drop the unzipped mopub-sdk into the folder.
Navigate back to Android Studio and open your project's settings.gradle file and include the MoPub SDK as a module as shown below. You may need to sync Gradle again in Android Studio to have the ‘mopub-sdk’ show up in the left Project window.
include ':app', ':mopub-sdk'
Open your project's build.gradle file and add jcenter as a repository and the MoPub SDK as a dependency:
repositories {
jcenter()
}
...
dependencies {
compile project(':mopub-sdk')
...
}
For those late to the party:
repositories {
jcenter()
}
dependencies {
compile('com.mopub:mopub-sdk:4.8.0#aar') {
transitive = true
}
}
just make sure you've added jcenter() in the your repositories. fabric does not do this automatically for some reason
It looks like there is no mopub-volley lib into mavencentral or jcenter
So tou can try to use
compile 'com.mcxiaoke.volley:library:1.0.18'
instead of
compile 'com.mopub.volley:mopub-volley:1.1.0'
It helps for me.

android studio gradle dependencies fails with no error

I'm using the gradle build script, in android studio to fetch the Parse android SDK, as follow:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.parse.bolts:bolts-android:1.+'
}
The build process succeeds with no errors, yet , when I the to import com.parse.Parse; I get cannot resolve symbol parse.
To my understanding, that build script was supposed to download the Parse SDK from a maven repository, and build it, or otherwise to fail.
Where do I have wrong?
Check Parse's Android Studio guide again, you'll see this:
Step 1 instructs you to download the SDK.
Step 2 asks you to first put Parse-*.java to the project's libs folder, and then add the script you've shown in your question into build.gradle. Notice that the library pulled from maven is just an auxiliary library, not the Parse library itself. This is why Android Studio cannot find the Parse class.

Categories

Resources