Supressed warnings of a third party library - android

I've added a library in my project which produces lot's of long warnings that get's all of my logcat and hardly I can find the warnings I really care about.
I use filtering and searching but it's still annoying.
I can't remove library from project and I can't fix warning for now.
How Can I supress this warning?
app/gradle
dependencies {
implementation(name: 'OneSignal-3.6.3', ext: 'aar') {
exclude group: 'com.google.android.gms', module: 'play-services-gcm'
exclude group: 'com.google.android.gms', module: 'play-services-location'
exclude group: 'com.google.android.gms', module: 'play-services-analytics'
exclude group: 'com.android.support', module: 'customtabs'
exclude group: 'com.android.support', module: 'support-v4'
}
}
Warning :
https://gist.github.com/zeynaliAli/45f0e8a64991fbc85798ea1f11456298

Related

Could not resolve com.android.support.test.espresso:espressgit so-core:3.0.1

Hours ago the gradle sync works well, however a moment ago, the testing dependency failed to download
Could not GET 'http://oss.jfrog.org/artifactory/oss-snapshot-local/com/android/support/test/espresso/espressgit%20so-core/3.0.1/espressgit%20so-core-3.0.1.pom'. Received status code 409 from server: Conflict
{
errors: [
{
status: 409,
message: "The repository 'oss-snapshot-local' rejected the resolution of an artifact 'oss-snapshot-local:com/android/support/test/espresso/espressgit so-core/3.0.1/espressgit so-core-3.0.1.pom' due to conflict in the snapshot release handling policy."
} ]
}
Deleted them solved the issue but I would like to retain the espresso dependency.
androidTestImplementation 'com.android.support.test.espresso:espressgit so-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'recyclerview-v7'
}
I think you typed git s or sgit into your build script while you thought the focus is in your terminal.
Look closely at the dependency, it says espressgit so-core but should probably be espresso-core which would then resolve from the android support repository and not reach the jfrog repository which responds with 409 whyever.

Android Espresso Framework Resolved versions for app (25.3.1) and test app (23.1.1) Error

I'am getting this error message when I try to add espresso libraries by gradle. How can I fix it ?
Problem is that espresso uses older versions of support libraries than you are. Since you already have then in your project, exclude them from espresso.
So, in your build.gradle file, you should replace:
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
with:
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
If you have more conflicts, try excluding more support modules (like appcompat, design etc).
use this code for testing actions like recyclerview
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2', {
exclude group: 'com.android.support', module: 'appcompact'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-annotations'
exclude module: 'recyclerview-v7'
})
or else use
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'appcompact'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-annotations'
exclude module: 'recyclerview-v7'
})

Error:Conflict with dependency 'com.android.support:support-v4' in project ':app'. Resolved versions for app (25.3.1) and test app (23.1.1) differ

I get this error every time i am trying to add dependency of Esspreso UI test library by the following dependency to use it in developing UI test for RecyclerView to get RecyclerViewActions.
androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.2.2'
while deleting previous dependency gradle is building perfectly
can anyone help me selving this problem??
Sample from my gradle :
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.squareup.okhttp3:okhttp:3.6.0'
compile 'com.github.bumptech.glide:glide:4.0.0-RC0'
testCompile 'junit:junit:4.12'
compile 'com.jakewharton:butterknife:8.6.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0'
compile 'com.google.android.exoplayer:exoplayer:r2.2.0'
androidTestCompile( 'com.android.support.test.espresso:espresso-intents:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestCompile( 'com.android.support.test:rules:0.5', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestCompile ('com.android.support.test:runner:0.5', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestCompile ('com.android.support.test.espresso:espresso-web:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestCompile( 'com.android.support.test.espresso:espresso-contrib:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
}
Update
After googling for an hour I found the solution within Vogella by
setting this dependency as following:
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2') {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-annotations'
exclude module: 'recyclerview-v7'
}
This would solve your problem:
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.2') {
exclude group: 'com.google.code.findbugs'
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'design'
exclude module: 'recyclerview-v7'
}
You need to just exclude every library you have already provided in build.gradle

Error:Conflict with dependency 'com.android.support: when update from 23.1.1 to 23.4.0

I have upgrade my build.gradle from
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
to
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
However, the existence of below test libraries cause some gradle sync error
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.2') {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'support-annotations'
exclude module: 'recyclerview-v7'
}
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2')
androidTestCompile 'com.android.support.test.espresso:espresso-web:2.2.2'
The error is
Error:Conflict with dependency 'com.android.support:appcompat-v7'. Resolved versions for app (23.4.0) and test app (23.1.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
Error:Conflict with dependency 'com.android.support:design'. Resolved versions for app (23.4.0) and test app (23.1.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
Error:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.4.0) and test app (23.1.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
How could I resolve this conflicts? Should I upgrade my test libraries as well (how to know which version to upgrade to)?
I perform various exclusion to resolve the problem. I hope there's a better answer (e.g. upgrade the test library?).
androidTestCompile ('com.android.support.test:runner:0.5') {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile ('com.android.support.test:rules:0.5') {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.2') {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'design'
exclude module: 'support-annotations'
exclude module: 'recyclerview-v7'
}
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2') {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile ('com.android.support.test.espresso:espresso-web:2.2.2') {
exclude group: 'com.android.support', module: 'support-annotations'
}

app:transformClassesWithJarMergingForDebug FAILED

when I try to run the app I am getting this error
before
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzsk.class
Now
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzqz$zza.class
I referred this,this and this. Tried the solutions mentioned there. Still I am far away from solving the Issue.
Please have a look on the app build gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile('com.android.support:appcompat-v7:23.1.1') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile('com.android.support:recyclerview-v7:23.1.1') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile('com.android.support:cardview-v7:23.1.1') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile('com.android.support:design:23.1.1') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.clevertap.android:clevertap-android-sdk:2.0.11'
compile 'com.android.support:support-v4:23.1.1'
compile('com.google.android.gms:play-services-analytics:8.3.0')
{
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.google.guava'
}
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile "com.squareup.picasso:picasso:2.4.0"
compile('com.google.android.gms:play-services-gcm:8.3.0') {
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.google.guava'
}
compile('com.google.android.gms:play-services:8.3.0') {
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.google.guava'
}
compile 'de.hdodenhof:circleimageview:1.3.0'
compile project(':volley')
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
compile 'com.android.support:multidex:'
apply plugin: 'com.google.gms.google-services'
}
I am happy to provide more information if needed.
UPDATE
When I comment compile 'com.clevertap.android:clevertap-android-sdk:2.0.11' It is working fine.
please check if some of your dependencies have multidex as dependency and exclude it. For example for Facebook SDK: you have this
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
change to this
compile('com.facebook.android:facebook-android-sdk:4.7.0') {
exclude group: 'com.android.support', module: 'multidex'
}
and check for other also.
Solved the issue by updating the com.google.android.gms:play-services version
from 8.3.0 to 8.4.0

Categories

Resources