adb push cannot stat 'd:\1.txt': No such file or directory
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了adb push cannot stat 'd:\1.txt': No such file or directory相关的知识,希望对你有一定的参考价值。
使用adb push命令出现没有文件提示 no such file or directory
cannot stat 'd:\1.txt': No such file or directory
我输入的命令是:
adb push d:\\1.txt /sdcard/ 或者 adb push d:\\1.txt /sdcard
都会出现如上错误 (D盘1.txt文件是存在的)
我的系统 windows 8.1 adb版本1.0.31
android adb传送文件至模拟器
adb push D:\\1.txt /sdcard/
在C:\Windows\system32>执行即可。
也就是说C:\Windows\system32>adb push d:\1.txt /sdcard/追问
还是会出错,运行了多个模拟器,一样的出现 error:more than one device and emulator
追答不好意思,才看到,问题应该解决了吧。
参数-s 是选择操作哪个设备,emulator-5554是你要操作的设备名称。
具体到你这里就是
C:\Windows\system32>adb -s emulator-5554 push d:\1.txt /sdcard/
“是怎样炼成的坏人,”这本书是二十二卷,已完成。属于城市生活的小说,原本在网络中流行。作品主人公谢文东,而作品主要讲述了成长过程中的小人。六,原名谢景龙,佳木斯谁现在住在大连。
在 OpenSuse 42.3 上安装 Java 9 时出现“cp: cannot stat”错误
【中文标题】在 OpenSuse 42.3 上安装 Java 9 时出现“cp: cannot stat”错误【英文标题】:"cp: cannot stat" error while installing Java 9 on OpenSuse 42.3 【发布时间】:2017-09-27 19:49:34 【问题描述】:我正在尝试在 OpenSuse 42.3 上安装 Java 9。 我已下载 java 9 rpm 文件并尝试在 OpenSuse 42.3 上安装,但出现以下错误。
user@localhost:~> sudo rpm -ivh Downloads/jdk-9_linux-x64_bin.rpm
Preparing... ################################# [100%]
Updating / installing...
1:jdk-9-2000:9-ga ################################# [100%]
Unpacking JAR files...
plugin.jar...
javaws.jar...
deploy.jar...
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/16x16/apps/sun-java.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/16x16/apps/sun-javaws.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/48x48/apps/sun-java.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/48x48/apps/sun-javaws.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/48x48/apps/sun-java.png': No such file or directory
cp: cannot stat '/usr/java/jdk-9/lib/desktop/icons/hicolor/48x48/apps/sun-javaws.png': No such file or directory
update-alternatives: using /usr/java/jdk-9/bin/java to provide /usr/bin/java (java) in auto mode
update-alternatives: error: alternative appletviewer can't be slave of javac: it is a slave of java
warning: %post(jdk-9-2000:9-ga.x86_64) scriptlet failed, exit status 2
我该如何解决这个问题?
【问题讨论】:
这可能是因为创建文件夹的权限被拒绝或未能找到 cp/scp 的相关权限?恕我直言,这应该移至unix.stackexchange 很难相信由于权限而导致安装失败,因为我正在使用sudo
进行安装。能否请您告诉我如何将其移至 unix.stackexchange?
您可以在那里创建一个问题并关闭此帖子以移至 unix.stackexchange。
在 RHEL 7.4 中实现相同
【参考方案1】:
我在 Centos7 上安装了 Java 9.0.4,只收到“无法统计”消息,但安装似乎没问题:
sudo rpm -ivh jdk-9.0.4_linux-x64_bin.rpm
Preparing... ################################# [100%]
Updating / installing...
1:jdk-9.0.4-2000:9.0.4-ga ################################# [100%]
Unpacking JAR files...
plugin.jar...
javaws.jar...
deploy.jar...
cp: cannot stat ‘/usr/java/jdk-9.0.4/lib/desktop/icons/hicolor/16x16/apps/sun-java.png’: No such file or directory
cp: cannot stat ‘/usr/java/jdk-9.0.4/lib/desktop/icons/hicolor/16x16/apps/sun-javaws.png’: No such file or directory
cp: cannot stat ‘/usr/java/jdk-9.0.4/lib/desktop/icons/hicolor/48x48/apps/sun-java.png’: No such file or directory
cp: cannot stat ‘/usr/java/jdk-9.0.4/lib/desktop/icons/hicolor/48x48/apps/sun-javaws.png’: No such file or directory
cp: cannot stat ‘/usr/java/jdk-9.0.4/lib/desktop/icons/HighContrast/16x16/apps/sun-java.png’: No such file or directory
cp: cannot stat ‘/usr/java/jdk-9.0.4/lib/desktop/icons/HighContrast/16x16/apps/sun-javaws.png’: No such file or directory
cp: cannot stat ‘/usr/java/jdk-9.0.4/lib/desktop/icons/HighContrast/48x48/apps/sun-java.png’: No such file or directory
cp: cannot stat ‘/usr/java/jdk-9.0.4/lib/desktop/icons/HighContrast/48x48/apps/sun-javaws.png’: No such file or directory
cp: cannot stat ‘/usr/java/jdk-9.0.4/lib/desktop/icons/hicolor/48x48/apps/sun-java.png’: No such file or directory
cp: cannot stat ‘/usr/java/jdk-9.0.4/lib/desktop/icons/hicolor/48x48/apps/sun-javaws.png’: No such file or directory
:
安装后的目录树如下:
:tree /usr/java/jdk-9.0.4/lib/desktop/icons
/usr/java/jdk-9.0.4/lib/desktop/icons
├── hicolor
│ ├── 16x16
│ │ ├── apps
│ │ │ └── sun-jcontrol.png
│ │ └── mimetypes
│ │ ├── gnome-mime-application-x-java-archive.png
│ │ ├── gnome-mime-application-x-java-jnlp-file.png
│ │ └── gnome-mime-text-x-java.png
│ └── 48x48
│ ├── apps
│ │ └── sun-jcontrol.png
│ └── mimetypes
│ ├── gnome-mime-application-x-java-archive.png
│ ├── gnome-mime-application-x-java-jnlp-file.png
│ └── gnome-mime-text-x-java.png
├── HighContrast
...
【讨论】:
以上是关于adb push cannot stat 'd:\1.txt': No such file or directory的主要内容,如果未能解决你的问题,请参考以下文章
Android 的adb push命令有返回的错误信息吗?用啥命令可以判断push进手机的文件是不是存在?谢谢
转载vue提示Uncaught TypeError: Cannot read property 'push' of undefined
错误 'Cannot run program "/home/uv/IDE/adt/sdk/platform-tools/adb": error=2, No such fil
adb push报错‘read-only file system‘
[ROC-RK3568-PC] 使用adb push文件到Android 11打印Read-only file system的解决方法