I found the solution for the problem I faced. Some solutions i tried :
First I tried with generating a signed release apk. Again here I faced same issue working fine when ran from android studio but getting error ("Android apk Installation failed. Installation package error, unable to install." / "app not installed." depending on the device ) , when tried to install app from google drive.
I checked installing app from command line using command " adb install app-release.apk ". Then I got the error :
app-release.apk: 1 file pushed. 4.3 MB/s (1246134 bytes in 0.275s)
pkg: /data/local/tmp/app-release.apk Failure
[INSTALL_FAILED_TEST_ONLY]
This is the link for the above issue
link
And the solution for this issue was in same link. The solution finally worked for me was
android.injected.testOnly=false
This line we need to add in gradle.properties file.