mlkit
mlkit copied to clipboard
The application could not be installed: INSTALL_FAILED_INVALID_APK
HI i am getting this error on a project that uses dynamic feature module..
I had previously had the ML kit dependency for face and text regonition on a feature module but when i moved it to the main "app" module, i get this error:
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_INVALID_APK
I had to move this into the app module because of this error -> https://github.com/googlesamples/mlkit/issues/160
Have you tried to remove the old installed apk and then install this one?
Yes i tried a clean on android studio that removes the previous built apk and also uninstalled the app as well..
I tried it as a api dependency as well as a implementation dependency like below but i still got the error. it fails everytime. but if i move the dependency below back to the feature module, its fine, ie.
api("com.google.android.gms:play-services-mlkit-text-recognition:"16.1.3")
if i do the below i cannot access that library now on my dynamic feature module that uses it and where it was originally located.
implementation("com.google.android.gms:play-services-mlkit-text-recognition:"16.1.3")
Oh, did you only move the dependency to base module but not the code reference? In order for MLKit to work, you will need to have all code+dependency using MLKit in the base module.
We cant, that will break our architecture.
We have a dynamic feature module that does the ML kit stuff
JUST A TOY
@jonneymendoza how do you fix it? r you moving it to the base?