com.android.ddmlib.SyncException:是目录 [英] com.android.ddmlib.SyncException: Is a directory

查看:96
本文介绍了com.android.ddmlib.SyncException:是目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用Android Studio中的运行按钮在设备上运行某个应用程序时,出现以下错误:

When I try to run a certain application onto my device using the 'Run' button in Android Studio, I get the following error:

12/16 15:05:27: Launching app
$ adb push /Users/me/myproject/app/build/outputs/apk/app-debug.apk /data/local/tmp/com.mycompany.myproject
com.android.ddmlib.SyncException: Is a directory
Error while Installing APK


$是目录
错误b $ b

自上次运行该项目以来,我还没有编辑过项目中的任何文件,尽管从那时起Android Studio 可能已升级到 Android Studio 2.2。 3

我能找到的最接近的错误是在针对SyncException的Google源代码,除了这里我们看到的是实际错误是本地路径是目录。,与该错误不完全匹配。

The closest error that I could find is in the Google source code for SyncException, except here we see that the actual error is Local path is a directory., which doesn't exactly match this error.

从我在 app / build / outputs / apk / 中看到, app-debug.apk 看起来像是一个合法的APK文件,即。 不是目录。

From what I see in app/build/outputs/apk/, app-debug.apk looks like a legitimate apk file, ie. not a directory.

我已经重新启动设备,从设备上卸载了应用程序,甚至还重新启动了计算机。

I have restarted my device, uninstalled the app from my device, and have even restarted my computer.

对于它的价值,我设备上的上一个应用是使用NativeScript构建的,并且具有相同的程序包名称。

For what it's worth, the previous app which was on my device was built using NativeScript and has the same package name.

推荐答案

只需在Alex P的答案中发布,就可以得到答案:

Just posting in Alex P's answer, so we have an answer:

尝试做 adb shell rm- rf / data / local / tmp 并先重启手机。没关系,如果您得到 rm:/ data / local / tmp:权限被拒绝。忽略它-它是用于tmp文件夹本身的,它的内容已被删除(这就是您所需要的)无论如何)

try doing adb shell rm -rf /data/local/tmp and rebooting the phone first. it's ok if you get rm: /data/local/tmp: Permission denied. ignore it - it's for the tmp folder itself after its content was already removed (that's what you need anyway)

这篇关于com.android.ddmlib.SyncException:是目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆