Home  >  Q&A  >  body text

java - 文件push不进android模拟器根目录

问题描述:使用的是android studio版本2.2.1,在用模拟器调试apk的时候需要将比较大的文件放置在根目录便于读取,通过Tools->Android->Android Device Monitor打开了DDMS,找到了mnt->sdcard,然后选择文件,点击push、pull文件,可是总是报错

[2016-10-12 17:14:58] Failed to push selection: Local path doesn't exist.
[2016-10-12 17:15:36] Failed to push selection: No space left on device
[2016-10-12 17:15:47] Failed to push selection: Invalid argument
[2016-10-12 17:16:24] Failed to push selection: No space left on device

补充:主要是错误No space left on device不解,根据网上的方法重启 无效,麻烦知道的朋友帮忙下,谢谢!

ringa_leeringa_lee2717 days ago514

reply all(3)I'll reply

  • 黄舟

    黄舟2017-04-18 10:21:19

    Ask and answer your own questions. I talked to a friend this afternoon and finally found the problem.
    The files should be placed in the path: storage->sdcard. Of course, it will be very troublesome to push files in batches. It is best to compress the files and then push them. However, there is no file manager in the simulator, so it is best to do it yourself. Next, I used the Es file browser to download it, drag it directly into the simulator, and it will be installed automatically. It is very convenient, and it is also strange. I wanted to install an apk for file decompression, but it didn't work after several attempts. . . . Someone who knows why, please tell me. Later, I remembered that Es seems to have its own decompression function, and then I tried it, and it worked (but an error will be reported when copying the js file, and it took a few attempts).

    In addition, I am a newbie, and while I am learning Android by myself, I feel that the emulator of Android Studio is getting worse and worse. When I first installed version 2.0, it had various lags, but now it is comparable to a real machine. @xialomg It’s not that I don’t want to use a real phone, but my phone’s android version is 6.0+, and the project requires 4.4.4.

    Additional picture:

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 10:21:19

    The emulator may not have enough space. Try using emulator -partition-size 1024 @myavd. If it doesn’t work, use a real machine

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 10:21:19

    1.Open shell

    adb shell

    2. Enter the root directory

    cd sdcard

    3. Get the full path to the root directory

    pwd

    4.push file to the root directory

    adb push [filePath] [pwd的全路径]

    reply
    0
  • Cancelreply