This is what I see when I try to install my app on my device (I'm using Android Studio 0.8.2):
Waiting for device.
Target device: samsung-gt_s7500-cf994b04
Uploading file
local path: C:\Users\Administrator\AndroidStudioProjects\Testaqua\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/com.example.administrator.testaqua
Installing com.example.administrator.testaqua
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.administrator.testaqua"
pkg: /data/local/tmp/com.example.administrator.testaqua
Failure [INSTALL_FAILED_INVALID_URI]
What in the seven hells does this error mean?
[Edited] I installed my app on another rooted device, and it worked; it seems the problem is my device, android studio is running fine.
I get similar error message, I fixed it by passing the absolute path instead of filename, e.g. inside adb shell
, this command will shows:
shell@example:/sdcard $ pm install -r -d app-release.apk
pkg: app-release.apk
Failure [INSTALL_FAILED_INVALID_URI]
Change it to absolute path fixed that error message, e.g.:
pm install -r -d /sdcard/app-release.apk
[Second reason]
Another reason is the file not exist. It happen when I interrupt adb push <apk> /sdcard/
by Ctrl+C recently. Re-push apk twice required.
[Third reason]
This error occurred if the apk reside /mnt/runtime/default/<thumb_drive_mounted_directory>
, I have to move the apk to /sdcard/
first to install.
From this blog try this :
Change permission of /data/local
to rwxrwxrwx
(normally it must be rwxrwxrw-
)
i.e. grant execution privileges to all users.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With