I am trying to make a splash screen which is animated, but facing an error (in title) while syncing the project.
Code in gradleFile is:
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
Dependencies are as follows:
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'
testCompile 'junit:junit:4.12'
compile 'com.github.VikaaSkool:AwesomeSplash:v1.0.0'
}
you have:
compile 'com.github.VikaaSkool:AwesomeSplash:v1.0.0'
instead of :
compile 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
notice VikaaSkool instead of ViksaaSkool
also, consider using implementation instead of compile, as it will be deprecated soon
Related
when using facebook, firebase-database account kit alone both work fine but when I am using both in same time in a project it give error-
java.lang.NoSuchMethodError: No static method zzb(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzac; or its super classes (declaration of 'com.google.android.gms.common.internal.zzac' appears in /data/app/com.neccargo-2/split_lib_dependencies_apk.apk:classes14.dex)
I am using 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:26.+'
compile 'com.android.support:design:26.+'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:recyclerview-v7:26.+'
compile 'com.android.support:cardview-v7:26.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.facebook.android:account-kit-sdk:4.+'
compile 'com.karumi:dexter:4.1.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5#aar'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1#aar'
compile 'com.wdullaer:materialdatetimepicker:2.3.0'
compile 'com.jakewharton:butterknife:8.7.0'
compile 'com.flaviofaria:kenburnsview:1.0.7'
compile 'com.google.firebase:firebase-database:10.0.1'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
}
apply plugin: 'com.google.gms.google-services'
I am stuck about to find solution.
Try adding firebase core library.
compile 'com.google.firebase:firebase-core:10.0.1'
I find my solution after many failure. In dependencies use those -
compile 'com.google.firebase:firebase-core:11.0.1'
compile 'com.google.firebase:firebase-database:11.0.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services:11.0.1'
and then add multiDexEnabled true in build.gradle
then add those line in buildscript-
classpath 'com.google.gms:google-services:3.1.0'
classpath 'com.google.firebase:firebase-plugins:1.0.4'
in there also add in allprojects-
maven {
url "https://maven.google.com"
}
Then create a class like -
public class AppUtils extends Application {
#Override
public void onCreate() {
super.onCreate();
FirebaseApp.initializeApp(getApplicationContext());
}
}
add this class name in AndroidManifest like-
android:name=".AppUtils"
That's the process I overcome that problem.
My app.gradle file contains :-
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:26.+'
compile 'com.android.support:design:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.github.bumptech.glide:glide:4.0.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
testCompile 'junit:junit:4.12'
}
Gradle console error output
What went wrong:
Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(26.0.0-alpha1) from [com.android.support:design:26.0.0-alpha1] AndroidManifest.xml:27:9-38
is also present at [com.android.support:cardview-v7:25.3.1] AndroidManifest.xml:24:9-31 value=(25.3.1).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:5-27:41 to override.
You have to use latest Facebook SDK.
You should use this.
compile 'com.facebook.android:facebook-android-sdk:4.25.0'
Then clean and rebuild the project.
Hope it helps.
I'm trying to exclude a class from jar, but it doesn't work.
Let me know hot to do it.
This is my code:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile ('com.google.android.gms:play-services-gcm:8.3.0') {
exclude module: 'com.google.android.gms.iid/zzb'
}
compile 'org.xwalk:xwalk_core_library:14.43.343.17'
compile 'com.google.code.gson:gson:2.4'
compile 'commons-io:commons-io:2.4'
compile 'com.google.android.gms:play-services-analytics:10.2.1'
compile project(":adjust")
}
This is the error message:
Error:Execution failed for task ':app:packageAllReleaseClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: com/google/android/gms/iid/zzb$zza$zza.class
In plain Gradle, what you are looking for can be achieved as:
dependencies {
compile('com.example.m:m:1.0') {
exclude group: 'org.unwanted', module: 'x
}
compile 'com.example.l:1.0'
}
This would exclude the module X from the dependencies of M, but will still bring it if you depend on L.
please help me to solve bug with Batch error
this error appears after run
and i make Sync but nothing happened
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:24.2.1'
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-v4:23'
compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'com.firebase:firebase-client-android:2.5.2+'
compile 'com.google.android.gms:play-services:7.0.0'
compile 'com.google.android.gms:play-services-gcm:7.0.0'
compile 'com.google.android.gms:play-services-ads:7.0.0'
compile 'com.batch.android:batch-sdk:1.5+'
compile 'com.squareup.picasso:picasso:2.5.2'
}
import com.batch.android.Batch;
import com.batch.android.Config;
import com.firebase.client.Firebase;
import com.google.android.gms.common.api.Batch;
This lib is available only at http://maven.batch.com/release maven repository, so check out, whether your configuration points to this repository too< like so:
repositories {
...
maven {
url "http://maven.batch.com/release"
}
}
I've encountered this problem on Android Espresso testing. But this works well when run/compile. I know this error has several threads but I have not been able to find a fix that matches my situation. I am currently dealing with a
"java.lang.IllegalAccessError: Class ref in pre-verified class
resolved to unexpected implementation".
I've already add
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2') {
exclude group: 'com.android.support', module: 'support-v4'
}
But it's still not working. Can somebody help me with this problem. Thanks.
Here is my dependencies
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
/*Android Testing*/
androidTestCompile 'com.android.support.test:runner:0.3'
androidTestCompile 'com.android.support.test:rules:0.3'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'
androidTestCompile 'com.android.support.test.espresso:espresso-idling-resource:2.2.1'
androidTestCompile 'com.android.support:support-annotations:23.0.1'
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.android.support:support-v4:23.0.+'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'commons-codec:commons-codec:1.9'
/*Showcase view for Facebook Intregation*/
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
/*Showcase view for SwipeRefresh*/
compile 'com.baoyz.pullrefreshlayout:library:1.2.0'
/*Multidex*/
compile 'com.android.support:multidex:1.0.1'
/*Crashlytics*/
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
}
Change
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2') {
exclude group: 'com.android.support', module: 'support-v4'
}
with
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.1') {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
}
Hope it help
Finally after a long time, I find a solution for gradle 1.5.
I move to Robotium and try this code.
But I think this will work too with Espresso.
Here it is,
androidTestCompile fileTree(dir: 'libs', include:'robotium-solo-5.3.0.jar')
androidTestCompile ('com.android.support:multidex-instrumentation:1.0.1') {
exclude group: 'com.android.support', module: 'multidex' }
project.configurations.all { config ->
if (config.name.contains("AndroidTest")) {
config.resolutionStrategy.eachDependency { details ->
if (details.requested.name == "multidex") {
details.useTarget("de.felixschulze.teamcity:teamcity-status-message-helper:1.2")
}
}
}
}