Android的工作室本地路径不存在 [英] Android Studio local path doesn't exist
问题描述
我输入我的Eclipse项目到Android的使用摇篮。 起初我有问题与R.java,但我解决了他们加入'根'的文件夹中项目设置的来源。
I imported my Eclipse project into Android using Gradle. At first I had problems with R.java but I resolved them by adding 'gen' folder as sources in Project Settings.
不过,尽管Android的Studio不会再出现任何的错误,当我试图将项目部署到Android设备,我得到的错误:
However, even though Android Studio doesn't show any errors any more, when I'm trying to deploy the project onto my Android device, I get the error:
Waiting for device.
Target device: 01c47c94e112d5fb
Uploading file
local path: C:\Users\Szymon\Eclipse\Android App\build\apk\Android App-debug-unaligned.apk
remote path: /data/local/tmp/szym1000.androidapp
Local path doesn't exist.`
我检查了我的Android应用程序文件夹,并没有建立
文件夹,这是事实。但是,为什么没有Android的工作室产生的呢?
I checked my Android App folder and there is no build
folder, that's true. But why didn't Android Studio generate it?
我发现有人有类似的问题<一href="http://stackoverflow.com/questions/16994596/android-studio-not-loading-on-device-local-path-doesnt-exist/">here.不过,我不知道如何在Android的Studio中运行 gradlew packageDebug
。任何想法?
I found someone had a similar problem here. However, I have no idea how to run the gradlew packageDebug
in Android Studio. Any ideas?
推荐答案
我只是碰到了这个问题,即使没有从Eclipse的传输,并且是沮丧,因为我一直没有表现出编译或packageDebug错误。不知怎的,这一切自我修复,如果你干净,然后运行packageDebug。不要担心去precated方法说明 - 这似乎是一个通用的通知开发商。
I just ran into this problem, even without transferring from Eclipse, and was frustrated because I kept showing no compile or packageDebug errors. Somehow it all fixes itself if you clean and THEN run packageDebug. Don't worry about the deprecated method statement - it seems to be a generic notice to developers.
打开一个命令行,并在项目的根目录下,运行:
Open up a commandline, and in your project's root directory, run:
./gradlew clean packageDebug
显然,如果这些步骤显示错误,你应该解决这些......但是,当他们都成功,你现在应该能发现,当您浏览本地路径的APK - 甚至更好,你的程序应该安装/在设备/仿真器上运行!
Obviously, if either of these steps shows errors, you should fix those...But when they both succeed you should now be able to find the apk when you navigate the local path -- and even better, your program should install/run on the device/emulator!
这篇关于Android的工作室本地路径不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!