Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio local path doesn't exist

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.

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.`

I checked my Android App folder and there is no build folder, that's true. But why didn't Android Studio generate it?

I found someone had a similar problem here. However, I have no idea how to run the gradlew packageDebug in Android Studio. Any ideas?

like image 914
Szymon Przedwojski Avatar asked Jun 16 '13 11:06

Szymon Przedwojski


4 Answers

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

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!

like image 158
alikonda Avatar answered Nov 17 '22 02:11

alikonda


You should try this little button in the toolbar: Sync with Graddle files icon

It should fix your problem.

if not, make sure your settings in build.gradle are set to 0.6.+

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.6.+'
    }
}

And then click on the button again.

like image 41
Distwo Avatar answered Nov 17 '22 03:11

Distwo


Try: Android Studio menu "File", "Invalidate Caches / Restarts..." For me "gradle clean packageDebug" don't works...

(I develop on two Pc and paths of src/build are different)

like image 25
Manzolo Avatar answered Nov 17 '22 01:11

Manzolo


This is because you have "spaces" in your folder name!!!

Please remove the "spaces" and try again!!!

like image 2
The Finest Artist Avatar answered Nov 17 '22 02:11

The Finest Artist