没有为模块指定Android Studio APK路径(Android Studio APK path not specified for module)

我已将Android Studio更新为0.3.2版。 但是我的项目有问题,它给了我这个错误:

关于最新发生的事情我只有一点点想法,所以我试着按F4(Windows)然后按'模块',然后TabFragmentExercise然后尝试更改'路径'并选择'使用模块编译路径'就像如何默认项目确实并改为:

C:\Users\PCNAME\AndroidStudioProjects\TabFragmentExerciseProject\TabFragmentExercise \build\classes\debug

然后重建项目但仍然没有机会。 它会给我这个结果:

Local path doesn't exist.

这是我的gradle配置:

gradle-wrapper.properties

#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.8-bin.zip

的build.gradle

buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.6.+' } } apply plugin: 'android' repositories { mavenCentral() } android { compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig { minSdkVersion 14 targetSdkVersion 16 } } dependencies { compile files('libs/android-support-v4.jar', 'libs/commons-io-2.4.jar', 'libs/apache-mime4j-0.6.1.jar', 'libs/httpclient-4.1.jar', 'libs/httpcore-4.1.jar', 'libs/httpmime-4.1.jar') }

希望有人可以帮助我。

I've updated my Android Studio into version 0.3.2. but I'm having a problem about my project and it gives me this error:

I only have a bit of idea on whats happening on this so I tried to press F4 (Windows) then 'Module' and then the TabFragmentExercise then tried to change the 'Paths' and selected the 'Use module compile path' just like on how the default project does and changed into this:

C:\Users\PCNAME\AndroidStudioProjects\TabFragmentExerciseProject\TabFragmentExercise \build\classes\debug

Then rebuild the project but still no chance. It will just give me this result:

Local path doesn't exist.

Here's my config for gradle anyways:

gradle-wrapper.properties

#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.8-bin.zip

build.gradle

buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.6.+' } } apply plugin: 'android' repositories { mavenCentral() } android { compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig { minSdkVersion 14 targetSdkVersion 16 } } dependencies { compile files('libs/android-support-v4.jar', 'libs/commons-io-2.4.jar', 'libs/apache-mime4j-0.6.1.jar', 'libs/httpclient-4.1.jar', 'libs/httpcore-4.1.jar', 'libs/httpmime-4.1.jar') }

Hope someone can help me on this.

最满意答案

所以在搜索之后我找到了解决方案。 首先,“没有为模块指定APK路径”ProjectName“的问题”实际上意味着在导入项目时未正确配置路径。您可以做的是执行上面我已经完成的步骤,而不是那个路径定位而你的apk。

现在,在您清理应用程序并尝试运行它之后,现在将遇到错误,指出“本地路径不存在”。 当发生这种情况时,请转到.iml文件,然后通过在facet-> configuration下添加以下行来配置路径:

<option name="APK_PATH" value="/build/apk/YourProject.apk" />

重建项目然后运行。 它确实像魔术一样。

So after searching I found out the solution for this. First the problem that the "APK path is not specified for module "ProjectName" really means that the path was not configured correctly upon importing on your project. What you can do is do the steps I've done above but instead of that path locate your apk instead.

Now after doing it when you clean the app and tried to run it you will now encounter an error saying that the "Local path doesn't exists". when that happens go to your .iml file then just configure the path by adding this lines under the facet->configuration:

<option name="APK_PATH" value="/build/apk/YourProject.apk" />

Rebuild project then run. It works like magic indeed.

没有为模块指定Android Studio APK路径(Android Studio APK path not specified for module)

我已将Android Studio更新为0.3.2版。 但是我的项目有问题,它给了我这个错误:

关于最新发生的事情我只有一点点想法,所以我试着按F4(Windows)然后按'模块',然后TabFragmentExercise然后尝试更改'路径'并选择'使用模块编译路径'就像如何默认项目确实并改为:

C:\Users\PCNAME\AndroidStudioProjects\TabFragmentExerciseProject\TabFragmentExercise \build\classes\debug

然后重建项目但仍然没有机会。 它会给我这个结果:

Local path doesn't exist.

这是我的gradle配置:

gradle-wrapper.properties

#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.8-bin.zip

的build.gradle

buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.6.+' } } apply plugin: 'android' repositories { mavenCentral() } android { compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig { minSdkVersion 14 targetSdkVersion 16 } } dependencies { compile files('libs/android-support-v4.jar', 'libs/commons-io-2.4.jar', 'libs/apache-mime4j-0.6.1.jar', 'libs/httpclient-4.1.jar', 'libs/httpcore-4.1.jar', 'libs/httpmime-4.1.jar') }

希望有人可以帮助我。

I've updated my Android Studio into version 0.3.2. but I'm having a problem about my project and it gives me this error:

I only have a bit of idea on whats happening on this so I tried to press F4 (Windows) then 'Module' and then the TabFragmentExercise then tried to change the 'Paths' and selected the 'Use module compile path' just like on how the default project does and changed into this:

C:\Users\PCNAME\AndroidStudioProjects\TabFragmentExerciseProject\TabFragmentExercise \build\classes\debug

Then rebuild the project but still no chance. It will just give me this result:

Local path doesn't exist.

Here's my config for gradle anyways:

gradle-wrapper.properties

#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.8-bin.zip

build.gradle

buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.6.+' } } apply plugin: 'android' repositories { mavenCentral() } android { compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig { minSdkVersion 14 targetSdkVersion 16 } } dependencies { compile files('libs/android-support-v4.jar', 'libs/commons-io-2.4.jar', 'libs/apache-mime4j-0.6.1.jar', 'libs/httpclient-4.1.jar', 'libs/httpcore-4.1.jar', 'libs/httpmime-4.1.jar') }

Hope someone can help me on this.

最满意答案

所以在搜索之后我找到了解决方案。 首先,“没有为模块指定APK路径”ProjectName“的问题”实际上意味着在导入项目时未正确配置路径。您可以做的是执行上面我已经完成的步骤,而不是那个路径定位而你的apk。

现在,在您清理应用程序并尝试运行它之后,现在将遇到错误,指出“本地路径不存在”。 当发生这种情况时,请转到.iml文件,然后通过在facet-> configuration下添加以下行来配置路径:

<option name="APK_PATH" value="/build/apk/YourProject.apk" />

重建项目然后运行。 它确实像魔术一样。

So after searching I found out the solution for this. First the problem that the "APK path is not specified for module "ProjectName" really means that the path was not configured correctly upon importing on your project. What you can do is do the steps I've done above but instead of that path locate your apk instead.

Now after doing it when you clean the app and tried to run it you will now encounter an error saying that the "Local path doesn't exists". when that happens go to your .iml file then just configure the path by adding this lines under the facet->configuration:

<option name="APK_PATH" value="/build/apk/YourProject.apk" />

Rebuild project then run. It works like magic indeed.