I try Firebase push notification in a separate Android studio project and it
work fin but when I integrate it in a existing project I had this problem .
Error :
D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
Depend:
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 project(':library')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.baoyz.swipemenulistview:library:1.3.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
}
apply plugin: 'com.google.gms.google-services'
Use implementation instead of compile. Also, make sure you have implemented Firebase Auth in your project.
Related
I am trying to use Google Maps Extension in my app. But when i try to use setClustering method to my Google Map object its showing not resolving error, that means google map class does not have this method.
mMap.setClustering(new ClusteringSettings().enabled(false).addMarkersDynamically(true));
However, according to library documentation i have to use like this. Also the available Stackoverflow answers also did like this answer way.
this is my dependency
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:27.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:cardview-v7:27.+'
compile 'com.android.support:design:27.+'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.code.gson:gson:2.7'
compile 'com.google.android.gms:play-services-location:12.0.1'
compile 'com.google.android.gms:play-services-maps:12.0.1'
compile 'com.google.android.gms:play-services-places:12.0.1'
compile 'com.androidmapsextensions:android-maps-extensions:2.4.0'
testCompile 'junit:junit:4.12'
}
How to solve this issue?
GoogleMap should be com.androidmapsextensions.GoogleMap not com.google.android.gms.maps.GoogleMap check your import.
com.androidmapsextensions.GoogleMap map;
map.setClustering(new ClusteringSettings().enabled(false).addMarkersDynamically(true));
I keep getting errors when I try to sync my gradle. It has something to do with the SDK version. I would like to know which firebase dependcies fit to 25.3.1
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.google.firebase:firebase-messaging:10.2.1'
//compile 'com.firebase:firebase-jobdispatcher:1.0.2'
//compile 'com.firebaseui:firebase-ui:0.5.2'
compile 'com.firebaseui:firebase-ui-database:1.2.0'
compile 'com.firebaseui:firebase-ui-auth:1.2.0'
compile 'com.firebaseui:firebase-ui-storage:1.2.0'
compile 'com.firebaseui:firebase-ui:1.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
You should use 10.2.1 and 1.2.0 version .
compile 'com.google.firebase:firebase-auth:10.2.1'
compile 'com.google.firebase:firebase-messaging:10.2.1'
Clean-Rebuild and Run .
// Getting a "Could not find" error? Make sure you have
// the
latest Google Repository in the Android SDK manager
I have recently updated my Android Studio version to 2.3
I am working on a project now and I've noticed that I am unable to import Snackbar class. I never had that problem before.
I can use it by adding compile 'com.nispok:snackbar:2.6.1' and I can import it then, but I don't think I should have to do that instead of just using Android's android.support.design.widget.Snackbar;
This is are my dependencies from build.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.2.0'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
I have also tried to play around with DataBinding concept in my project but I don't think this could cause that issue?
Thank you.
You are missing the compile 'com.android.support:design:25.2.0' in your dependencies. As the library is not added you are unable to get the Snackbar class.
New to firebase but when I try to use private FirebaseAuth mAuth; as stated in their Email Auth guide it is not able to resolve. I have set up firebase in the project and it says I have done it correctly.
Do I need to import something on that java file?
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.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.android.support:design:25.3.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
You need to add:
import com.google.firebase.auth.FirebaseAuth;
Android Studio will help you with unresolved references like this one. Click on the unresolved symbol and enter Alt+Enter. The needed import will be automatically added.
I'm trying to Authorizing and using googel API for android but when I try to configure build dependencies and sync the project it give me an error like
Error:Execution failed for task ':app:prepareDebugAndroidTestDependencies'.> Dependency Error.
See console for details.
build gradle (app):
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.google.android.gms:play-services-auth:10.2.0'
compile 'com.google.api-client:google-api-client:1.22.0'
compile 'com.google.api-client:google-api-client-android:1.22.0'
compile 'com.google.apis:google-api-services-people:v1-rev4-1.22.0'
how can I solve this?
Not sure, but I think your google apis are conflicting
compile 'com.google.android.gms:play-services-auth:10.2.0'
and
compile 'com.google.api-client:google-api-client:1.22.0'
Might internally be using other dependencies, with different versions.
Try running: /gradlew app:dependencies to see all your dependencies