1

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()
}
  }
filthy_wizard
  • 740
  • 11
  • 25

1 Answers1

0

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

Community
  • 1
  • 1
Jorge Casariego
  • 21,948
  • 6
  • 90
  • 97
  • iam using mavenCentral() – filthy_wizard Jun 05 '15 at 12:40
  • it seems to build then i get more errors to do with Dagger. damn – filthy_wizard Jun 05 '15 at 12:50
  • to do with the "Dagger" annotation when creating a component. iam guessing thats why it wont make the .apk. – filthy_wizard Jun 05 '15 at 12:53
  • Did you add repositories {mavenCentral()} to your build.gradle file? – Jorge Casariego Jun 05 '15 at 13:03
  • yes changed it from jcenter() to mavenCentral(). also added compile 'javax.annotation:jsr250-api:1.0' and compile 'org.glassfish:javax.annotation:10.0-b28' to my app build.gradle. the issue seems to be with "Daggermycomponent" and the import javax.annotation.Generated – filthy_wizard Jun 05 '15 at 13:08
  • i dont have all these exact dependencies but i do have the plugin applied apply plugin: 'com.neenbedankt.android-apt' and the dependencies 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' – filthy_wizard Jun 05 '15 at 15:32
  • i also read somewhere that 'apt' wasn't needed with dagger 2.0 but iam not 100%. been reading way too many stackoverflow questions – filthy_wizard Jun 05 '15 at 15:33
  • ive added my gradle.build files above. – filthy_wizard Jun 05 '15 at 15:48