zsajjad / react-native-text-detector

Text Detector from image for react native using firebase MLKit on android and Tesseract on iOS
MIT License
222 stars 60 forks source link

Android app crashes on startup: com.google.android.gms.internal.zzdls not found #6

Closed SimoneMSR closed 6 years ago

SimoneMSR commented 6 years ago

I have followed the instruction in the README.md, added the google-services.json file. When I run my app, I can see from the Android Studio debugger this error:

E/AndroidRuntime: FATAL EXCEPTION: FirebaseMLHandler
                  Process: com.businesscards, PID: 17600
                  java.lang.NoClassDefFoundError: com.google.android.gms.internal.zzdls

And the app just crashes. I have googled the error, cleaned and rebuild the project, but the error is still there. What's happening? Could that be the gradle version?

my package.json contains

...
  "dependencies": {
    "react": "16.3.1",
    "react-native": "0.55.4",
    "react-native-camera": "^1.2.0",
    "react-native-text-detector": "^0.0.5"
  },
...

I use

zsajjad commented 6 years ago

This package uses Firebase ML Kit for text recognition on android please make sure you have integrated firebase in your app before started integration of this package. Here is the guide for Firebase integration.

SimoneMSR commented 6 years ago

Thank you @zsajjad for your hint. But the problem was elsewhere, with the react-nativa-camera module that I was using.- Following this issue post, I was trying to use react-native-camera with your react-native-text-detector. The solution hinted by the community lead me to the error I wrote before. I solved the problem by changing some configuration in my gradle conf files. Now this is working!

zsajjad commented 6 years ago

Happy that you are out of trouble.

Ali-Ayyad commented 5 years ago

@SimoneMSR can you share what changes did you do to the gradle conf files ? Having the same problem

SimoneMSR commented 5 years ago

@Ali-Ayyad , I have applied these changes