本文介绍了android studio在哪里构建我的.apk文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在重新构建项目,因此存在很多问题.目前,一切正常,除了当我尝试运行该应用程序时,我收到消息本地路径不存在." ,其中本地路径指向该路径: AndroidStudioProjects \ MyProject \ MyProject .. \ build \ production \ MyProject.apk ,确实如此,该位置或项目文件系统中的其他任何地方都没有.apk文件.

I've been rebuilding my project from the ground up, so there's been a lot of problems with it. At the moment, everything's working great, except that when I try to run the app, I get the message 'Local path doesn't exist.', where the local path is pointing at the path: AndroidStudioProjects\MyProject\MyProject..\build\production\MyProject.apk, and true enough, there is no .apk file at that location, or indeed anywhere else in the project filesystem.

但是,我可以毫无问题地构建应用程序,运行gradlew packageDebug会给我消息"构建成功",因此应生成.apks .我的问题是,它们要去哪里,或者如果不生成它们,为什么不呢?

However, I can build the app with no problems, and running gradlew packageDebug gives me the message 'build successful', so .apks should be being generated. My question is, where are they going, or if they aren't being generated, why not?

每个模块集的构建路径在哪里?我有些困惑,因为项目结构-> Facets-> Android->编译器设置,项目结构->模块->路径->编译器输出,build.gradle和MyProject.iml似乎都与构建路径,但我不太了解它们之间的关系

Where is the build path of each module set? I'm somewhat confused because the Project Structure->Facets->Android->Compiler settings, Project Structure->Modules->Paths->Compiler Output, build.gradle, and MyProject.iml all seem to have something to do with the build path, but I don't quite understand how they relate

edit:我知道它应该在哪里,但是它不在那里,所以我想知道如何更改构建路径

edit: I know where it should be, but it's not there so I want to know how to change the build path

出于某种原因,运行 gradlew build 确实会创建.apks,但不能从程序内部进行构建或运行

edit 2: For some reason running gradlew build does create .apks, but not building or running from inside the program

edit 3:这是我的gradlew构建输出,请注意,它确实构建成功:

edit 3: Here's my gradlew build output, note that it does build successfully:

Creating properties on demand (a.k.a. dynamic properties) has been deprecated and is scheduled to be removed in Gradle 2.0. Please read http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html for information on the replacement for dynamic properties.
Deprecated dynamic property: "target" on "com.android.build.gradle.LibraryExtension_Decorated@9e9aabc", value: "android-16".
:TwoWayLib:mergeReleaseProguardFiles UP-TO-DATE
:TwoWayLib:packageReleaseAidl UP-TO-DATE
:TwoWayLib:prepareReleaseDependencies
:TwoWayLib:compileReleaseAidl UP-TO-DATE
:TwoWayLib:generateReleaseBuildConfig UP-TO-DATE
:TwoWayLib:mergeReleaseAssets UP-TO-DATE
:TwoWayLib:compileReleaseRenderscript UP-TO-DATE
:TwoWayLib:mergeReleaseResources UP-TO-DATE
:TwoWayLib:processReleaseManifest UP-TO-DATE
:TwoWayLib:processReleaseResources UP-TO-DATE
:TwoWayLib:compileRelease UP-TO-DATE
:TwoWayLib:processReleaseJavaRes UP-TO-DATE
:TwoWayLib:packageReleaseJar UP-TO-DATE
:TwoWayLib:packageReleaseLocalJar UP-TO-DATE
:TwoWayLib:packageReleaseRenderscript UP-TO-DATE
:TwoWayLib:bundleRelease UP-TO-DATE
:Rogue:prepareRogueProjectTwoWayLibUnspecifiedLibrary UP-TO-DATE
:Rogue:prepareDebugDependencies
:Rogue:compileDebugAidl UP-TO-DATE
:Rogue:generateDebugBuildConfig UP-TO-DATE
:Rogue:mergeDebugAssets UP-TO-DATE
:Rogue:compileDebugRenderscript UP-TO-DATE
:Rogue:mergeDebugResources UP-TO-DATE
:Rogue:processDebugManifest UP-TO-DATE
:Rogue:processDebugResources UP-TO-DATE
:Rogue:compileDebug UP-TO-DATE
:Rogue:dexDebug UP-TO-DATE
:Rogue:processDebugJavaRes UP-TO-DATE
:Rogue:validateDebugSigning
:Rogue:packageDebug
:Rogue:assembleDebug
:Rogue:prepareReleaseDependencies
:Rogue:compileReleaseAidl UP-TO-DATE
:Rogue:generateReleaseBuildConfig UP-TO-DATE
:Rogue:mergeReleaseAssets UP-TO-DATE
:Rogue:compileReleaseRenderscript UP-TO-DATE
:Rogue:mergeReleaseResources UP-TO-DATE
:Rogue:processReleaseManifest UP-TO-DATE
:Rogue:processReleaseResources UP-TO-DATE
:Rogue:compileRelease UP-TO-DATE
:Rogue:dexRelease UP-TO-DATE
:Rogue:processReleaseJavaRes UP-TO-DATE
:Rogue:packageRelease
:Rogue:assembleRelease
:Rogue:assemble
:Rogue:check UP-TO-DATE
:Rogue:build
:TwoWayLib:mergeDebugProguardFiles UP-TO-DATE
:TwoWayLib:packageDebugAidl UP-TO-DATE
:TwoWayLib:prepareDebugDependencies
:TwoWayLib:compileDebugAidl UP-TO-DATE
:TwoWayLib:generateDebugBuildConfig UP-TO-DATE
:TwoWayLib:mergeDebugAssets UP-TO-DATE
:TwoWayLib:compileDebugRenderscript UP-TO-DATE
:TwoWayLib:mergeDebugResources UP-TO-DATE
:TwoWayLib:processDebugManifest UP-TO-DATE
:TwoWayLib:processDebugResources UP-TO-DATE
:TwoWayLib:compileDebug UP-TO-DATE
:TwoWayLib:processDebugJavaRes UP-TO-DATE
:TwoWayLib:packageDebugJar UP-TO-DATE
:TwoWayLib:packageDebugLocalJar UP-TO-DATE
:TwoWayLib:packageDebugRenderscript UP-TO-DATE
:TwoWayLib:bundleDebug UP-TO-DATE
:TwoWayLib:assembleDebug UP-TO-DATE
:TwoWayLib:assembleRelease UP-TO-DATE
:TwoWayLib:assemble UP-TO-DATE
:TwoWayLib:check UP-TO-DATE
:TwoWayLib:build UP-TO-DATE

BUILD SUCCESSFUL

Total time: 10.848 secs

推荐答案

YourApplication \ app \ build \ outputs \ apk

YourApplication\app\build\outputs\apk

这篇关于android studio在哪里构建我的.apk文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 10:59