Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is android studio building my .apk file?

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.

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?

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: I know where it should be, but it's not there so I want to know how to change the build path

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

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 
like image 767
Migwell Avatar asked Jul 17 '13 14:07

Migwell


People also ask

How can I create APK file in Android Studio?

In the menu bar, click Build > Generate Signed Bundle/APK. In the Generate Signed Bundle or APK dialog, select Android App Bundle or APK and click Next. Below the field for Key store path, click Create new.

Where will the status of building and running the project is shown in the Android Studio IDE?

The tool windows give you access to specific tasks like project management, search, version control, and more. You can expand them and collapse them. The status bar displays the status of your project and the IDE itself, as well as any warnings or messages.

How Android APK is built?

The compilers convert your source code into DEX (Dalvik Executable) files, which include the bytecode that runs on Android devices, and everything else into compiled resources. The APK Packager combines the DEX files and compiled resources into a single APK.


2 Answers

YourApplication\app\build\outputs\apk

like image 139
Mehdi Boukhechba Avatar answered Sep 22 '22 19:09

Mehdi Boukhechba


You should Build your app instead of debugging process. Just follow this:

Build -> Build Bundles/APK(s) -> Build APK(s) 

enter image description here

like image 24
Sajid khan Avatar answered Sep 19 '22 19:09

Sajid khan