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.
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
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!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With