Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio is not loading on the device, local path doesn't exist

I recently attempted to migrate my Eclipse project over to Android Studio. All went well until I attempted to run the project and an error came up:

Uploading file
    local path: /Users/user/Documents/myapp/Android/myapp/build/apk/myapp-debug-unaligned.apk
    remote path: /data/local/tmp/com.mycompany.myapp
Local path doesn't exist.

How can I fix this problem?

Edit I want to mention as this is still getting answers and comments, this issue occurred while using Android Studio 0.1.3 and have not had similar issues with newer versions of Android Studio when converting eclipse projects.

like image 882
knightsbore Avatar asked Jun 08 '13 00:06

knightsbore


3 Answers

Go to your project folder. Open ProjectName folder.

In file Your_Project_name.iml add

<option name="APK_PATH" value="/build/apk/your_app_name-debug-unaligned.apk" />

Or

<option name="APK_PATH" value="/build/outputs/apk/your_app_name-debug-unaligned.apk"/>

In new versions of Android studio

like image 87
ZanMax Avatar answered Oct 05 '22 01:10

ZanMax


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.

Open up a commandline, and in your project's root directory, run:

./gradlew clean packageDebug

Obviously, if either of these steps shows errors, you should fix those...But when they both succeed you should be able to find the apk when you navigate the local path -- and even better, your program should install/run on the device/emulator!

like image 43
alikonda Avatar answered Oct 05 '22 02:10

alikonda


I've encountered this problem after migrating from Eclipse to Android Studio. As shantanu said,

gradlew packageDebug

helped to point out that I need local.properties file, so I've created it in the project root with just one line, and after that all works fine.
local.properties contain only one property - sdk.dir, and looks like (in Windows):

sdk.dir=c:\\path-to-android-studio\\sdk

Don't forget to change \ in your path to \\ (there's no need to escape / in Linux or Mac).

Wrote this answer only to gather all info about common problem after migrating from Eclipse to Android Studio to help many people get rid of this little trouble faster without googling every step.

like image 27
SpongeBobFan Avatar answered Oct 05 '22 03:10

SpongeBobFan