无法从Android Studio在我的设备中安装Android应用

时间:2015-02-11 13:00:26

标签: android cyanogenmod

我使用Android Studio 1.1 Beta4构建了一个非常简单的示例,并尝试将其部署在我的设备中,该设备是运行Cyanogenmod12 ROM的Samsung S4(Int)。我总是收到以下错误:

Waiting for device.
Target device: samsung-gt_i9505-dd755d6b
Uploading file
    local path: C:\workspaces\androidws\ButtonsExample\app\build\outputs\apk\app-debug.apk
    remote path: /data/local/tmp/com.kpor.android.buttonsexample
Installing com.kpor.android.buttonsexample
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.kpor.android.buttonsexample"
pkg: /data/local/tmp/com.kpor.android.buttonsexample
Failure [INSTALL_FAILED_CONTAINER_ERROR]

adb shell df的输出是:

Filesystem               Size     Used     Free   Blksize
/dev                   905.2M    48.0K   905.2M   4096
/sys/fs/cgroup         905.2M    12.0K   905.2M   4096
/mnt/asec              905.2M     0.0K   905.2M   4096
/mnt/obb               905.2M     0.0K   905.2M   4096
/system                  1.1G   678.4M   430.3M   4096
/cache                   2.0G    35.6M     2.0G   4096
/firmware               86.0M     9.0M    76.9M   16384
/firmware-mdm           86.0M    49.8M    36.1M   16384
/efs                    13.4M     4.4M     9.0M   4096
/data                    9.1G     7.5G     1.6G   4096
/mnt/shell/emulated      9.1G     7.5G     1.6G   4096
/mnt/media_rw/sdcard1: Permission denied
/storage/sdcard1        50.6G    45.1G     5.4G   4096
/data/media/0/Android/data/com.androidauthority: Permission denied

我无法弄清楚导致此错误的原因。有什么想法吗?

1 个答案:

答案 0 :(得分:1)

最后,我弄清楚发生了什么......我读了一篇文章(链接如下),我所要做的就是:

转到:设置>应用>单击菜单,然后选择首选安装位置。

我将其从“让系统决定”更改为“内部设备存储”。更改后,我可以使用Android Studio安装任何APK文件。

http://www.reddit.com/r/cyanogenmod/comments/2uv9hn/cm12_apk_install_issue/