Android Studio - 本地路径不存在 [英] Android Studio - local path doesn't exist

查看:322
本文介绍了Android Studio - 本地路径不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将Android Studio更新为0.2.4后,无法让我的项目部署。 apk文件名完全不匹配。

 等待设备。 
目标设备:0146B0020E010020
上传文件
本地路径:/home/martin/workspace/git/projectname/projectname/project/build/classes/debug/AppName.apk
remote路径:/data/local/tmp/com.xxx.xxx.android.projectname
本地路径不存在。

在这里阅读一些帖子后,我将输出路径更改为build / apk文件夹,但问题遗迹。而不是创建的projectname-debug-unaligned.apk,他正在寻找projectname.apk,我不知道如何和在哪里可以让他改变他正在寻找的名字。任何想法?



PS:是的,我已经阅读了几个显示在右侧列表中的帖子。 IDE的重新启动为我的同事工作,但不适合我。



编辑:



我从一个问题下一个,所以我回到了我可以找到的唯一可下载的版本:0.2 .0。



没有消失的UI元素,我可以创建新的项目,最重要的是,我可以再次将工作室中的APK部署到我的设备。我将尽快发布0.2.5。

解决方案

我从0.2.13升级到0.3。这些说明已经更新,用于发布Android Studio 0.5.2。这些是我完成的解决问题的步骤。



1.在build.gradle中,确保gradle设置为 0.9.0

  buildscript {
repositories {
mavenCentral()
}
依赖关系{
classpath'com.android.tools.build:gradle:0.9.0'
}
}

2.在gradle-wrapper.properties中,确保使用gradle 1.11

  #Wed Apr 10 15:27:10 PDT 2013 
distributionBase = GRADLE_USER_HOME
distributionPath = wrapper / dists
zipStoreBase = GRADLE_USER_HOME
zipStorePath = wrapper / dists
distributionUrl = http\://services.gradle.org/distributions/gradle-1.11-all.zip

3.通过按avd按钮左侧的按钮,使用渐变文件进行同步工程





4.尝试再次构建项目。如果仍然有问题可能会尝试文件>无效缓存/重新启动



注意:如果您使用 0.9。+ 并且它给无法GET'http://repo1.maven.org/maven2/com/android/tools/build/gradle/'。从服务器收到状态码401:未经授权(偶尔发生),然后更改为 0.9.0 。此外,您必须使用19.0或更高版本的构建工具,我相信所以请确保您已经在sdk管理器中下载了这些工具,并将其作为 buildToolsVersion 在任何gradle文件中保存该信息。 p>

After updating Android Studio to 0.2.4 I can't get my project to deploy. There is a complete mismatch of the apk filename.

Waiting for device.
Target device: 0146B0020E010020
Uploading file
    local path: /home/martin/workspace/git/projectname/projectname/project/build/classes/debug/AppName.apk
    remote path: /data/local/tmp/com.xxx.xxx.android.projectname
Local path doesn't exist.

After reading some posts here, I changed the output path to the build/apk folder, but the issue remains. Instead of the created projectname-debug-unaligned.apk he is looking for the projectname.apk and I have no idea how and where I can tell him to change the name he is looking for. Any ideas?

PS: Yes I have read several posts which are shown in the list on the right side. The restart of the IDE worked for my coworker, but not for me.

Edit:

I stumbled from one issue to the next so I reverted back to the only downloadable version I could find: 0.2.0.

No disappearing UI elements, I can create new projects and, best of all, I can finally deploy the APK from the studio to my device again. I will try 0.2.5 as soon as it is released.

解决方案

I originally saw this error after upgrading from 0.2.13 to 0.3. These instructions have been updated for the release of Android Studio 0.5.2. These are the steps I completed to resolve the issue.

1.In build.gradle make sure gradle is set to 0.9.0

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

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

#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip

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

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

NOTE: If you are using 0.9.+ and it gives Could not GET 'http://repo1.maven.org/maven2/com/android/tools/build/gradle/'. Received status code 401 from server: Unauthorized (happens sporadically) then change to 0.9.0. Also, you have to use build tools 19.0 or greater I believe so make sure you have those downloaded in sdk manager and use as buildToolsVersion in whichever gradle file holds that info.

这篇关于Android Studio - 本地路径不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆