I'm working on a Google sign in that sends an OTP to a phone number, however when I update the dependencies, a captcha appears. How can I get rid of it?
All methods are implemented by myself.
Using the Google Console, you can enable your Android Device Verification.
in firebase, add sha-256 and SHA-1 Also Add playconsole sha-1 and sha 256 as well.
However, the captcha is still not removed.
Is there anyone who can assist me with this?
here is dependencies
implementation 'com.google.firebase:firebase-inappmessaging-display:20.1.1'
implementation 'com.google.firebase:firebase-analytics:20.0.0'
implementation 'com.google.android.gms:play-services-ads:20.4.0'
implementation 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
implementation 'com.facebook.android:facebook-share:12.1.0'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
implementation platform('com.google.firebase:firebase-bom:29.0.0')
implementation 'androidx.browser:browser:1.2.0'
implementation 'com.google.android.gms:play-services-safetynet:17.0.1'
these all dependencies i am using
google play services dependencies are
implementation 'com.google.android.gms:play-services-maps:18.0.0'
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation 'com.google.android.gms:play-services-auth:19.2.0'
I also implement all methods that are answer in stackoverflow
follow this link
Here is my gradebuild file
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.0'
}
Go to the settings in Firebase,
Click on App Check,
Click on the package name,
Enable safetyname,
Save.
This should work if you implemented all methods.
Use release Sha-1 and Sha-256.
Enable Android device verification from the Google Console.
Related
I'm trying to implement Firebase dynamic links in an application that already uses Firebase, but once I added the needed libraries for dynamic links I started receiving this error:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[19.0.
2]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
these are the old dependencies related to Firebase that were previously used in the app:
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation 'com.google.firebase:firebase-core:17.2.1'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.google.firebase:firebase-ml-vision:24.0.1'
and these are the new ones I'm trying to add:
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:26.0.0')
// Declare the dependencies for the Dynamic Links and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-dynamic-links-ktx'
implementation 'com.google.firebase:firebase-analytics-ktx'
I'm not sure which dependency the error is referring to that need to be updated.
If you're going to use the Firebase BoM:
implementation platform('com.google.firebase:firebase-bom:26.0.0')
you should specify all of your Firebase depedencies without version numbers, and let the BoM assign them, so that they are all compatible with each other. This means stripping off the version numbers for the dependencies you added for FCM and others:
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-database'
implementation 'com.google.firebase:firebase-core'
implementation 'com.google.firebase:firebase-ml-vision'
I don't know about 'com.google.android.gms:play-services-auth:17.0.0' - you might have to make sure that one is manually up to date to the latest version.
I have the right library and dependencies the build gradle(app) file. But I'm still etting this error.
According to some answers here, I have already tried all of them. I already checked if i have the right version, whether i have included the package correctly, whether the package name is same in google-service.json file, in manifest file, or in gradle file. I have already done all these.
// All google dependencies
implementation 'com.google.android.gms:play-services-maps:12.0.1'
implementation 'com.google.android.gms:play-services-location:12.0.1'
implementation 'com.google.android.gms:play-services-places:12.0.1'
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.google.firebase:firebase-database:12.0.1'
implementation 'com.google.firebase:firebase-auth:12.0.1'
implementation 'com.google.firebase:firebase-messaging:12.0.1'
implementation 'com.firebaseui:firebase-ui:3.3.0'
implementation 'com.firebase:firebase-client-android:2.5.2'
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.android.gms:play-services-gcm:12.0.1'
implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.github.ar-android:DrawRouteMaps:1.0.0'
these are backdated on purpose.
as this answer(https://stackoverflow.com/a/39217164/11686135) suggests, i have already done that:
import com.firebase.ui.database.FirebaseRecyclerAdapter;
import com.firebase.ui.database.FirebaseRecyclerOptions;
and this is the error its showing: Cannot resolve symbol 'database'
maybe somehow the dependencies not working...?
i am really novice at this. thanks in advance
Perhaps you are missing a dependency, please refer to the
GitHub project for FirebaseUI,
you might be missing just one more dependency such as any of these:
dependencies {
// FirebaseUI for Firebase Realtime Database
implementation 'com.firebaseui:firebase-ui-database:5.0.0'
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:5.0.0'
// FirebaseUI for Firebase Auth
implementation 'com.firebaseui:firebase-ui-auth:5.0.0'
// FirebaseUI for Cloud Storage
implementation 'com.firebaseui:firebase-ui-storage:5.0.0'
}
if someone is getting same issue then try searching for Firebase Dependencies latest version
and add it issue will be resolved
These are Latest dependencies add accordingly for use
To learn more
click here
dependencies {
// FirebaseUI for Firebase Realtime Database
implementation 'com.firebaseui:firebase-ui-database:6.3.0'
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:6.3.0'
// FirebaseUI for Firebase Auth
implementation 'com.firebaseui:firebase-ui-auth:6.3.0'
// FirebaseUI for Cloud Storage
implementation 'com.firebaseui:firebase-ui-storage:6.3.0'
}
Firebaserecycleroption.
Basically android studio will change their version.
but build.gradle old dependencies are working in new version. So guys try to all dependecies in gradle.
gradle build dependencies:
compile 'com.firebaseui:firebase-ui-database:2.0.0'
implementation 'com.firebaseui:firebase-ui-database:4.3.2'
implementation 'com.firebaseui:firebase-ui-firestore:4.3.1'
implementation 'com.firebaseui:firebase-ui-database:5.0.0'
implementation 'com.firebaseui:firebase-ui-database:6.3.0'
//( Below two dependencies are same apply both )
compile 'com.firebaseui:firebase-ui-database:0.4.0'
compile'com.firebaseui:firebase-ui-database:1.1.1'
implementation 'com.firebaseui:firebase-ui-database:8.0.1'
( must try it )
I am new to android development environment and I need to connect my app to firebase but I am getting this error
Failed to resolve: firebase-auth-15.0.0
This error is shown in the statement:
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
This statement contain details of two versions, I think the error is caused due to this, but this particular statement is provided by firebase itself. See the image:
I tried to change the above statement to
implementation 'com.google.firebase:firebase-auth:16.0.3'
But then firebase dependency is not setting up.
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
Replace the above one with
implementation 'com.google.firebase:firebase-auth:16.0.1'
Instead of:
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
Insert these two lines:
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-core:16.0.6'
Warnings should disappear
Try to use only implementation 'com.google.firebase:firebase-auth:16.0.1' in your code.
In your root build.gradle file add the repo:
allprojects {
repositories {
google()
jcenter()
// ...
}
}
Check if your firebase core is the same version than your firebase auth
implementation 'com.google.firebase:firebase-core:16.0.3'
implementation 'com.google.firebase:firebase-auth:16.0.3'
and in your classpath an up version of 3.0.0
classpath 'com.android.tools.build:gradle:3.0.1' //up of this version
check this page to be up to date with firebase version:
https://firebase.google.com/support/release-notes/android#latest_sdk_versions
Try This add the dependency for Authentication to your app-level build.gradle file
implementation 'com.google.firebase:firebase-auth:16.0.3'
Worked with me, follow me.
I had this same problem. In the implementation of dependencies they are with the implementation 'com.google.firebase: firebase-auth: 16.0.2' ". The first is usually implemented manually and the second when we click the add button authentication with Firebase by the console in Android Studio and that is where the error begins. This button does not need to be triggered to authenticate the app. Just the first button to Connect with Firebase.
In the build.gradle file, keep only one Auth dependency.
Add firebase-core dependency and the latest versions of dependencies from this page:
fire base libraries
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'`
Replace the above with this -->
implementation 'com.google.firebase:firebase-auth:16.0.1'
I had the same problem. I updated the Android Studio and the Gradle ,it seems to work fine now
When I connect to Firebase Auth I got error in dependencies check this screen shot. How to fix this error?
You need to override the clashing support libraries by adding the conflicted libraries explicitly in your dependencies block.
dependencies {
implementation "com.android.support:support-media-compat:28.0.0"
implementation "com.android.support:animated-vector-drawable:28.0.0"
}
or you can use the whole support-v4 library which is include all the above libraries:
dependencies {
implementation "com.android.support:support-v4:28.0.0"
}
The message is self explanatory, you are using different versions for each of the following.
implementation 'com.android.support:support-media-compat:26.1.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
Change any one to match another, usually upgrading is better choice.
i'm learning Android while doing some work on it. I'm trying to update an app's version to Android 8.0, that includes sdk, libraries and external APIs used.
I looked it up and it seems like 15.0.1 is the suggested version. But when i use it, gradle fails for play-services-analytics and firebase services to sync saying it cannot resolve the library and nor can it find the Repository if i press Install Repository.
So currently i'm using version 12.0.1 for both play services and firebase services. Using it like:
implementation 'com.google.android.gms:play-services-maps:12.0.1'
implementation 'com.google.android.gms:play-services-analytics:12.0.1'
implementation 'com.google.android.gms:play-services-ads:12.0.1'
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.google.android.gms:play-services-gcm:12.0.1'
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.firebase:firebase-analytics:12.0.1'
implementation 'com.google.firebase:firebase-crash:12.0.1'
implementation 'com.google.firebase:firebase-messaging:12.0.1'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
But if i try to use only the play-services 15.0.1 except for analytics then it gives me another warning that using different versions of play services and firebase services can lead to runtime crashes.
So it puts me in a weird situation, i've googled and searched, but cant find anything that works for me... What would be the correct way to deal with this here? Should i settle for 12.0.1? or update what ever works? (Previously the version was 9.4.0 or something along that line; before i was doing the Android 8.0 upgrade)
EDIT: These are my top level gradle dependencies
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.2'
You cannot mix versions of firebase and google play services that are less than or equal to 12 with versions that are greater than or equal to 15.
Therefore you need to update the version number of all these libraries:
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-analytics:15.0.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-analytics:16.0.1'
implementation 'com.google.firebase:firebase-crash:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.1.0'
Check this:
https://firebase.google.com/support/release-notes/android
https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html
Beginning with version 15, each Maven dependency matching com.google.android.gms:play-services-* and com.google.firebase:firebase-* is no longer required to have the same version number in order to work correctly at build time and at run time.
Also use the following google play services plugin in the top level gradle file:
classpath 'com.google.gms:google-services:4.0.1'