Android Studio는 내 .apk 파일을 어디에 구축합니까?
저는 처음부터 프로젝트를 재 구축해 왔기 때문에 많은 문제가있었습니다. 현재 앱을 실행하려고 할 때 '로컬 경로가 존재하지 않습니다' 라는 메시지가 표시된다는 점을 제외하면 모든 것이 잘 작동 합니다. , 여기서 로컬 경로는 경로 : AndroidStudioProjects \ MyProject \ MyProject .. \ build \ production \ MyProject.apk를 가리키고 있고, 사실이면 해당 위치 또는 실제로 프로젝트 파일 시스템의 다른 곳에 .apk 파일이 없습니다.
그러나 문제없이 앱을 빌드 할 수 있으며 gradlew packageDebug를 실행하면 ' 빌드 성공 ' 메시지가 표시 되므로 .apks 가 생성 되어야 합니다. 내 질문은 그들이 어디로 가고 있는지, 아니면 생성되지 않는 경우 왜 안됩니까?
각 모듈 세트의 빌드 경로는 어디에 있습니까? Project Structure-> Facets-> Android-> Compiler 설정, Project Structure-> Modules-> Paths-> Compiler Output, build.gradle 및 MyProject.iml 모두와 관련이있는 것 같기 때문에 다소 혼란 스럽습니다. 경로를 구축했지만 어떻게 관련되는지 잘 모르겠습니다.
편집 : 나는 그것이 있어야 할 곳을 알고 있지만 거기에 없기 때문에 빌드 경로를 변경하는 방법을 알고 싶습니다.
편집 2 : 어떤 이유로 gradlew 빌드를 실행하면 .apks 가 생성되지만 프로그램 내부에서 빌드하거나 실행하지 않습니다.
편집 3 : 다음은 내 gradlew 빌드 출력입니다. 성공적으로 빌드됩니다.
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
AndroidStudio 프로젝트 파일로 이동
- 프로젝트 이름을 선택하고
- 앱 선택
- 빌드 선택
- 출력 선택
- APK 선택
AVD 또는 하드웨어 장치에서 앱을 실행 한 경우 여기에서 앱의 APK 파일을 찾을 수 있습니다.
code
Android Studio에서 컴파일 한 후 여기에서 찾았습니다.
~ \ MyApp_Name \ app \ build \ outputs \ apk \ app-debug.apk
I was having the issue finding my debug apk. Android Studio 0.8.6 did not show the apk or even the output folder at project/project/build/. When I checked the same path project/project/build/ from windows folder explorer, I found the "output" folder there and the debug apk inside it.
For Android Studio:
If you haven't built the APK at least once, you might not find the /Outputs/APK folder. Go to Build in Android Studio and one of the last three options is Build APK, select that. It will then create that folder and you will find your APK file there.
You should Build your app instead of debugging process. Just follow this:
Build -> Build Bundles/APK(s) -> Build APK(s)
When Gradle builds your project, it puts all APKs in build/apk directory. You could also just do a simple recursive find command for *.apk in the top level directory of your project.
Here is a better description...
View full image at http://i.stack.imgur.com/XwjEZ.png
Mine application's apk was at this location
C:\Users\haseeb_mir\AndroidStudioProjects\MyTestApp\app\build\outputs\apk\debug
In my case to get my debug build - I have to turn off Instant Run option :
File → Settings → Build, Execution, Deployment → Instant Run and uncheck Enable Instant Run.
Then after run project - I found my build into Application\app\build\outputs\appDebug\apk directory
in android 3.1.0 Above use below path to find signed version of APK
home/AndroidStudioProjects/<projedct name>/app/app-release.apk
and in windows
AndroidStudioProjects\{project name}\app\release\app-release.apk
Take a look at this question.
TL;DR: clean, then build.
./gradlew clean packageDebug
When you have android studio make your signed apk file it uses
<property name="ExportedApkPath" value="$PROJECT_DIR$/PROJNAME/APPNAME.apk" />
inside workspace.xml to find out where to place it. However, if you use ./gradlew assembleRelease
it places it inside PROJNAME/build/apk. I have the same problem. For some reason my android studio will not show me anything inside the apk subdirectory so the apk is for all intents and purposes missing. But if you search with finder it's most definitely there.
참고URL : https://stackoverflow.com/questions/17702053/where-is-android-studio-building-my-apk-file
'IT story' 카테고리의 다른 글
감독자 소켓 오류 문제 [종료 됨] (0) | 2020.09.04 |
---|---|
C # DateTime.Now 정밀도 (0) | 2020.09.04 |
Twitter 부트 스트랩을 사용하여 자동으로 경고를 닫는 방법 (0) | 2020.09.04 |
@viewchild [duplicate]를 사용하여 여러 viewchildren에 액세스 (0) | 2020.09.04 |
Java에서 다른 반환 유형으로 오버로드? (0) | 2020.09.04 |