I tried adding this dependency in gradle : 'com.stripe:stripe-android:17.1.1'
But this gave me this error :
So I changed my gradle dependency to
{implementation('com.stripe:stripe-android:17.1.1') { exclude group: "org.bouncycastle" }}
Now I'm able to build the project successfully . Is this workaround correct or will there be any issues in future when I use stripe SDK functions .
Related
I'm using an 'aar' library which I created.
In both, my project and the library, there is a dependency implementation of Conceal library (each from its own lib folder).
When I build the project after importing the library and using ProGuard obfuscation, I get this error message:
Error: Program type already present: com.facebook.crypto.cipher.NativeGCMCipher
How can I resolve this problem?
this error say you are importing the dependency which already imported in project.
solution :- remove or exclude this dependency
ex:-
compile ('com.github.ganfra:material-spinner:1.1.1'){
exclude group: 'com.nineoldandroids'
}
according to mavenCentral(), this is the package name (which could be used instead of .jar):
// https://mvnrepository.com/artifact/com.facebook.conceal/conceal
implementation "com.facebook.conceal:conceal:2.0.2"
therefore the exclusion should look about like this:
implementation( project(":libraryproject") ) {
exclude group: "com.facebook.conceal"
}
To my understanding, the error means that I imported a dependency that already imported in the project (once in the project and once in the library).
The suggested solutions of #Mayur Dabhi and #Martin Zeitler had the right approach, but unfortunately, I wasn't able to get the exclude command working.
finally, with the help of #Martin Zeitler, I replaced:
implementation files('libs/conceal_android.jar')
implementation files('libs/libconceal.jar')
with:
implementation "com.facebook.conceal:conceal:2.0.2"
meaning I removed the 'Conceal' jar files from the 'lib' folder and imported the dependency. After that, the error message disappeared and I managed to build the project.
Thanks for anyone who tried to help :)
So I am trying to use this library in my android app to be able to show pdf files. However, when I add the install line to my build.gradle file, Android Studio says that all Android support libraries should use the same version. This happens because the library uses com.android.support:support-compat:26.1.0 while my project is using com.android.support:appcompat-v7:28.0.0.
I want to know if there is a way to get around this and use the library in my project, or if I would have to fork and update the library myself to make it work.
Any help is appreciated.
simply exclude it from the build:
api ("com.github.barteksc:android-pdf-viewer:2.8.2") {
exclude group: "com.android.support", module: "appcompat-v7"
}
I have a problem with library. I copy `
compile ('de.psdev.licensesdialog:licensesdialog:1.8.0')
to gradle and when sync I get error:
Warning:Conflict with dependency 'com.google.code.findbugs:jsr305'. Resolved versions for app (3.0.0) and test app (2.0.1) differ.
Any ideas how can I resolve my problem and use that library in my project.
I resolve my problem:
compile ('de.psdev.licensesdialog:licensesdialog:1.8.0') {
exclude group: 'com.google.code.findbugs', module: 'jsr305'
}
This happens because the main APK and the test APK use the same library (com.google.code.findbugs) but in different versions (your main APK use version 3.0.0 while your test APK use 2.0.1). So you need to tell to gradle to use for test the updated library.
Just add
androidTestCompile 'com.google.code.findbugs:jsr305:3.0.0'
to your gradle file :)
I'm trying to discover the specific conflict when adding espresso to my app's gradle file:
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.1') {
exclude group: 'com.android.support', module: 'support-annotations'
}
Android Studio states "Warning:Conflict with dependency 'com.google.code.findbugs:jsr305'.
Dependency conflict error in my Android app which has Android Tests states the error means the dependency I am using in my app is version 3.0.0 while the one in my test app is 2.0.1.
However, my gradle never explicitly adds "com.google.code.findbugs", indicating it was part of another dependency I added to my "compile" and "androidTestCompile" statements. How do I find the dependencies in my app that are using findbugs?
Check your dependencies:
HelloApp/
app/
- build.gradle // local gradle config (for app only)
...
- build.gradle // global gradle config (for whole project)
- settings.gradle
- gradle.properties
Check here:
dependencies {
compile project(':libraries:lib')
}
Later check this LINK you have Unit testing support orientation
Execute the following command:
./gradlew app:dependencies
This will print a (large) graph of dependencies.
For the meaning of the arrows and stars, please refer to this SO answer.
Official Spring for Android page mentions to add following dependency code.
dependencies {
compile 'org.springframework.android:spring-android:1.0.1.RELEASE'
}
which is latest version of build as of this time.(as per website)
I have added it in apps' build.gradle but I get an error as
Error:Failed to find: org.springframework.android:spring-android:1.0.1.RELEASE
What is the right way to do it?
I could add google play services as dependency in the same way.
Here is the correct dependency for the Rest Template module. I've corrected this on the Spring for Android project page. Thank you very much for pointing out this error.
dependencies {
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
}
You can find correct and lastest version on spring site. Under the Quick Start title.
http://projects.spring.io/spring-android/