mlkit icon indicating copy to clipboard operation
mlkit copied to clipboard

The application could not be installed: INSTALL_FAILED_INVALID_APK

Open jonneymendoza opened this issue 3 years ago • 5 comments

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

jonneymendoza avatar Mar 31 '21 10:03 jonneymendoza

Have you tried to remove the old installed apk and then install this one?

cs-googler avatar Mar 31 '21 18:03 cs-googler

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")

jonneymendoza avatar Mar 31 '21 18:03 jonneymendoza

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.

cs-googler avatar Apr 02 '21 17:04 cs-googler

We cant, that will break our architecture.

We have a dynamic feature module that does the ML kit stuff

jonneymendoza avatar Apr 08 '21 15:04 jonneymendoza

JUST A TOY

leiiiooo avatar Jun 09 '21 03:06 leiiiooo

@jonneymendoza how do you fix it? r you moving it to the base?

fnzainal avatar May 17 '23 03:05 fnzainal