Closed PsyOhm23 closed 6 years ago
Hi! Thank you for trying my package and sorry for the inconvenience.
You may build for android. Please try following step.
change applicationId in <root>/android/app/build.gradle
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "<your application id>" // here
}
change package name in <root>/android/app/src/main/AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="<your application id>"> // here
configure firebase https://firebase.google.com/docs/android/setup?authuser=1
In add application phase, you need use same application id at step 1, 2.
Thanks.
Hi, Thank you for your response Unfortunately, i've already set my package name in both build.gradle and manifest according to my firebase project but i still have this error.
I encounter an other issue with the google-services.json file. It says that is missing from the searched location :
File google-services.json is missing. The Google Services Plugin cannot function without it. Searched Location: flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.1.0/android/src/nullnull/debug/google-services.json flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.1.0/android/src/debug/nullnull/google-services.json flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.1.0/android/src/nullnull/google-services.json flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.1.0/android/src/debug/google-services.json flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.1.0/android/src/nullnullDebug/google-services.json flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.1.0/android/google-services.json
I cant make another issue about this if you want
Otherwise, did you try your plugin outside your plugin project ? I mean that you're maybe not in a real app configuration ? and it could help you for understanding those issues Thank you
OK.
<project root>/android/build.gradle
buildscript {
// ...
dependencies {
// ...
classpath 'com.google.gms:google-services:3.2.0' // google-services plugin
}
}
allprojects { // ... repositories { // ... maven { url "https://maven.google.com" // Google's Maven repository } } }
2. enable plugin in `<project root>/android/app/build.gradle`
apply plugin: 'com.android.application'
android { // ... }
dependencies { // Getting a "Could not find" error? Make sure you have // added the Google maven respository to your root build.gradle }
// ADD THIS AT THE BOTTOM apply plugin: 'com.google.gms.google-services'
https://firebase.google.com/docs/android/setup
I hope this help you.
Thanks.
Hi, Sorry for my late answer but i still have the issue :( I've just create an empty Flutter project and add the dependency in pubspec.yaml for simplicity The Google Services Plugin continues searching for google-services.json in the cache folder of mlkit flutter plugin (the same folders that I've mentionned in my previous answer). Did you try your plugin in a separate project ? Maybe there is a parameter to indicate to your plugin where is the google-services.json file?
Thank you for your time :)
Ok, I'll try it! Thanks.
Hi, @PsyOhm23 !
I'm very sorry... It was flutter_mlkit's bug. https://github.com/azihsoyn/flutter_mlkit/pull/15/files#diff-7ae5a9093507568eabbf35c3b0665732L40
Now it fixed, so please use flutter_mlkit ^0.2.2.
Thank you for reporting!
And I pushed sample app repo. https://github.com/azihsoyn/flutter_mlkit_sample
Thank you very much !! Now it's working perfectly ;) Thank's for the sample too 👍
Great work....!!!!!!!!!!
Thx 😁
Hi, First, thank you for developing this MLKit plugin for flutter :) I'm trying to configure your plugin but it seems that it don't take my package name When I launch my app, I have this error :
Could you tell me if there is a place to give my package name ? Thank's