我最近升级到android studio 1.2.1.1,当我运行我的项目时,突然收到错误消息“本地路径不存在”?
这是因为调试.apk文件不在集成开发环境正在查找的位置。
本地路径: C:\Users\eoin_a\AndroidStudioProjects\XmppTest\app\build\outputs\apk\app-debug.apk
我自己也找过了,但apk不在那里。事实上,我似乎根本找不到我的项目中的.apk文件?
我已经尝试了一些我之前提出的问题的解决方案,但我在这里找不到任何乐趣。我已经尝试了与gradle同步,并清理项目,但没有运气。
我在cmd中尝试过"gradlew clean“,但没有效果。
我会尝试将此代码添加到项目.iml文件中
<option name="APK_PATH" value="/build/apk/apk file name" /> 在标签内部。
但是我没有.apk文件,或者我找不到它。如果有人能在这里帮我,那就太棒了!
我还有gradle中的依赖项,我有gradle插件版本1.2.3
classpath 'com.android.tools.build:gradle:1.2.3'编辑:
我只是想把我的gradle.build文件放上去,因为它们可能会有用。我还是不知道是怎么回事
应用插件:'com.android.application‘应用插件:'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'
}
}和
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()
}
}发布于 2015-06-05 20:15:29
你能看看你的设置是不是这样的:
1.在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.在gradle-wrapper.properties中,确保使用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.zip3.通过按avd按钮左侧的按钮将项目与gradle文件同步

4.尝试重新构建项目。如果仍有问题,请尝试文件>无效缓存/重新启动
这样做对我很管用
https://stackoverflow.com/questions/30665894
复制相似问题