android studio upgrade to 1.2.1.1 results in "local path doesnt exist" error

353 views Asked by At

ive recently upgraded to android studio 1.2.1.1 and all of a sudden when I run my project iam getting the error "local path doesnt exist"?

this is due to the fact that the debug .apk file is not in the location the IDE is looking.

local path: C:\Users\eoin_a\AndroidStudioProjects\XmppTest\app\build\outputs\apk\app-debug.apk

ive searched myself and the apk isn't there. In fact i cant seem to find the .apk file in my project at all?

Ive tried a number of solutions Ive seen on previously asked questions but Iam getting no joy here. Ive tried syncing with gradle and clean the project with no luck.

Ive tried in cmd "gradlew clean packageDebug" to no avail.

i would try adding this to the project .iml file

<option name="APK_PATH" value="/build/apk/apk file name" /> 

inside tags.

but I dont have a .apk file or I cant find it. If anyone could help me out here that would be awesome!

also withing my dependencies in gradle I have gradle plugin version 1.2.3

    classpath 'com.android.tools.build:gradle:1.2.3'

EDIT:

just thought id put up my gradle.build files as they may be of use. Iam still not sure whats going on

apply plugin: 'com.android.application' apply plugin: 'com.neenbedankt.android-apt'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "com.example.eoin_a.xmpptest"
    minSdkVersion 15
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'


compile ("org.igniterealtime.smack:smack-android:4.1.0-rc1")
        {
            exclude(group: 'xpp3', module: 'xpp3')
            exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
        }
compile ("org.igniterealtime.smack:smack-tcp:4.1.0-rc1")
        {
            exclude(group: 'xpp3', module: 'xpp3')
            exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
        }
// optional features
compile ("org.igniterealtime.smack:smack-android-extensions:4.1.0-rc1")
        {
            exclude(group: 'xpp3', module: 'xpp3')
            exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
        }


compile 'javax.annotation:jsr250-api:1.0'
apt 'com.google.dagger:dagger-compiler:2.0'
compile 'com.google.dagger:dagger:2.0'
compile 'org.glassfish:javax.annotation:10.0-b28'





testCompile 'junit:junit:4.12'
testCompile "org.assertj:assertj-core:1.7.0"
testCompile('org.robolectric:robolectric:3.0-rc2') {
    exclude group: 'commons-logging', module: 'commons-logging'
    exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
}

and

buildscript {
repositories {
    mavenCentral()


}
dependencies {
    classpath 'com.android.tools.build:gradle:1.2.3'
    classpath 'org.robolectric:robolectric-gradle-plugin:1.0.1'
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    mavenCentral()
}
  }
1

There are 1 answers

8
Jorge Casariego On

Could you see if you have in this way your settings:

1.In build.gradle

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

2.In gradle-wrapper.properties make sure to use gradle 2.2.1

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip

3.Sync project with gradle files by pressing the button to the left of the avd button

enter image description here

4.Try to build project again. If still having issues possibly try File > Invalidate Caches/Restart

Doing this way worked for me

I follow this https://stackoverflow.com/a/19496969/2091181