Android Question Compilation OK,but install on device failed

zeuspower

Member
Licensed User
Longtime User
Hello again,after some ...years !

Try to install my app to a Lenovo phone,android 4.4.1 ,(and also on Genymotion emu ,with 4.4.4 android) I get the following :


B4X:
B4A Version: 7.80
Parsing code.    (0.06s)
Compiling code.    (0.50s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.02s)
Generating R file.    (0.67s)
Compiling generated Java code.    (4.53s)
Convert byte code - optimized dex.    (1.88s)
Packaging files.    (0.47s)
Copying libraries resources    (2.35s)
    Found 3 resource files.
Signing package file (debug key).    (6.44s)
ZipAlign file.    (0.85s)
Installing file to device.    Error
[  2%] /data/local/tmp/test_phones.apk
[  4%] /data/local/tmp/test_phones.apk
[  6%] /data/local/tmp/test_phones.apk
[  8%] /data/local/tmp/test_phones.apk
[ 10%] /data/local/tmp/test_phones.apk
[ 13%] /data/local/tmp/test_phones.apk
[ 15%] /data/local/tmp/test_phones.apk
[ 17%] /data/local/tmp/test_phones.apk
[ 19%] /data/local/tmp/test_phones.apk
[ 21%] /data/local/tmp/test_phones.apk
[ 24%] /data/local/tmp/test_phones.apk
[ 26%] /data/local/tmp/test_phones.apk
[ 28%] /data/local/tmp/test_phones.apk
[ 30%] /data/local/tmp/test_phones.apk
[ 32%] /data/local/tmp/test_phones.apk
[ 34%] /data/local/tmp/test_phones.apk
[ 37%] /data/local/tmp/test_phones.apk
[ 39%] /data/local/tmp/test_phones.apk
[ 41%] /data/local/tmp/test_phones.apk
[ 43%] /data/local/tmp/test_phones.apk
[ 45%] /data/local/tmp/test_phones.apk
[ 48%] /data/local/tmp/test_phones.apk
[ 50%] /data/local/tmp/test_phones.apk
[ 52%] /data/local/tmp/test_phones.apk
[ 54%] /data/local/tmp/test_phones.apk
[ 56%] /data/local/tmp/test_phones.apk
[ 58%] /data/local/tmp/test_phones.apk
[ 61%] /data/local/tmp/test_phones.apk
[ 63%] /data/local/tmp/test_phones.apk
[ 65%] /data/local/tmp/test_phones.apk
[ 67%] /data/local/tmp/test_phones.apk
[ 69%] /data/local/tmp/test_phones.apk
[ 72%] /data/local/tmp/test_phones.apk
[ 74%] /data/local/tmp/test_phones.apk
[ 76%] /data/local/tmp/test_phones.apk
[ 78%] /data/local/tmp/test_phones.apk
[ 80%] /data/local/tmp/test_phones.apk
[ 82%] /data/local/tmp/test_phones.apk
[ 85%] /data/local/tmp/test_phones.apk
[ 87%] /data/local/tmp/test_phones.apk
[ 89%] /data/local/tmp/test_phones.apk
[ 91%] /data/local/tmp/test_phones.apk
[ 93%] /data/local/tmp/test_phones.apk
[ 96%] /data/local/tmp/test_phones.apk
[ 98%] /data/local/tmp/test_phones.apk
[100%] /data/local/tmp/test_phones.apk
test_phones.apk: 1 file pushed. 5.4 MB/s (3001513 bytes in 0.531s)
Failure [INSTALL_FAILED_VERIFICATION_FAILURE]


>> (On my xiaomi ,version 6 ,works ok)
 
Last edited:

zeuspower

Member
Licensed User
Longtime User
Not working,Erel...
My manifest if it helps :

B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="14" />

<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"    />)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
 SetActivityAttribute(main,  android:windowSoftInputMode, "stateHidden|adjustPan")
 AddPermission("android.permission.READ_CONTACTS")
AddPermission("android.permission.WRITE_CONTACTS") 'if write access is required
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
android:minSdkVersion="16" android:targetSdkVersion="14"
minimum api 16 but targetting 14? Try to set the second to 22

B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" />
 
Upvote 0

zeuspower

Member
Licensed User
Longtime User
It worked for android 5 (probably the manifest editin from DonManfred worked ! thanks !)

in android 4 same errors
Erel I did (just putting the procedure to open adb shell for everyone maybe don't know how) :
  • Using Windows Explorer, navigate to your SDK-directory and open the folder "platform-tools",
  • If you installed Android Studio Bundle, the default path is: C:\Users\'username'\AppData\Local\Android\sdk
  • Hold down the left "Shift"-button while right clicking somewhere inside the folder,
  • In the menu, click "Open command window here",
  • In the opened command window, type "adb shell" (without the "") and press enter ,
  • "shell@grouper:/ $" should now appear on a new line,
  • You have now opened your ADB Shell,
  • settings put global package_verifier_enable 0

  • (in the phone ,but was already deselected) Settings -> Security -> Deselect Verify Apps.
 
Last edited:
Upvote 0

zeuspower

Member
Licensed User
Longtime User
Finally I copied the apk with the usb cable from my pc ,and then opened and installed it from inside the phone with a file browser..works OK !
Maybe this helps to find the problem anyway,to help others.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…