Skip to content

Godot:Export:Android

Editor Settings

Godot-Editor-Settings.png

Export Android

Godot-Export-Android.png

Use Custom Build

플러그인이 존재하거나 특정 자바 코드를 추가해야 한다면 커스텀 빌드를 진행해야 한다.

우선 상단 메뉴의 Project > Install Android Build Template을 클릭한다:

Godot_-_install_android_build_template.png

그리고 출력되는 대화상자에서 "Install" 버튼을 클릭한다. 내용은 다음과 같다:

  • This will set up your project for custom Android builds by installing the source template to "res://android/build".
  • You can then apply modifications and build your own custom APK on export (adding modules, changing the AndroidManifest.xml, etc.).
  • Note that in order to make custom builds instead of using pre-built APKs, the "Use Custom Build" option should be enabled in the Android export preset.
  • 소스 템플릿을 "res://android/build"에 설치하여 맞춤 Android 빌드용 프로젝트를 설정합니다.
  • 그런 다음 수정 사항을 적용하고 내보낼 때 사용자 정의 APK를 빌드할 수 있습니다(모듈 추가, AndroidManifest.xml 변경 등).
  • 미리 빌드된 APK를 사용하는 대신 사용자 지정 빌드를 만들려면 Android 내보내기 사전 설정에서 "사용자 지정 빌드 사용" 옵션을 활성화해야 합니다.

Godot_-install_android_build_template-_confirm.png

설치가 완료되면 res://android/build 경로에 안드로이드 프로젝트(빌드용 템플릿)가 추가된다. (버전 관리 파일에 추가해야 한다)

필요한 모듈(플러그인)을 추가하고 "Android Export" 시, "Use Custom Build" 버튼을 클릭하면 된다.

Godot_-_android_export_with_use_custom_build.png

이 후 Editor-> Editor Settings > Export > Android 항목에 가서 Custom Build SDK Path를 설정해야 한다.

Godot_-editor_settings-export-android-_custom_build_sdk_path.png

Troubleshooting

Unsupported class file major version 61

Gradle#Unsupported class file major version 61 항목 참조.

Could not find keystore, unable to export

Editor-> Editor Settings > Export > Android 항목에 가서 keystore 가 파일 경로, 사용자명, 비밀번호 세 가지 정보가 잘 적혀있는지 확인해보자.

Godot_-editor_settings-_android_debug_keystore.png

'jarsigner' returned with error #1

코드 사인 정보가 잘못돼 있으면 문제가 생긴다. keytool 도구로 다시 키스토어 파일을 만들자.

  1. keytool -genkey -v -keystore debug.keystore -alias debug -keyalg RSA -keysize 2048 -validity 10000
  2. goto Editor-> Editor Settings > Export > Android
  3. Debug keystore field: Point to keystore file in JDK folder.
  4. replace field "Debug keystore user:" to name that keysore.
  5. replace field "Debug keystore password:" password when you generate keystore.

See also

Favorite site