-
Notifications
You must be signed in to change notification settings - Fork 110
Developer Guide Android
Quantumrunner edited this page May 16, 2021
·
2 revisions
- To develop apps, you need the Android SDK, so install and update Android Studio.
- Press Windows + R and type in
control sysdm.cpland press Enter.- Goto Advanced → Environment Variables.
- Under the System Variables add an entry named
ANDROID_SDK_ROOTwith the value%LOCALAPPDATA%\Android\sdk. - Modify the System Variable named
PATHand add the path%ANDROID_SDK_ROOT%\platform-toolsand%ANDROID_SDK_ROOT%\tools(remember to separate the paths with a semicolon ";" on Windows 7 or below. Windows 10 will show you a list, no manual separation needed).
- Press Windows + R type in
cmdand press Enter. Type inadb versionand press Enter. The command should succeed and display the ADB version. - Activate the Developer Options on your Android device by entering Settings → About Device → Build number → Tap it 10 times. You will then find a new entry Settings → Developer Options on your device. Inside activate Android (USB) Debugging.
- Connect your device to your computer via USB.
- Press Windows + R type in
cmdand press Enter. Type inadb devicesand press Enter. You should see your device listed in the returned command result. - Open Unity and load the Valkyrie project. Goto File → Build Settings, select "Android", press "Switch Platform" and press "Build and Run". A popup may appear on your Android device (depending on the Android version), asking for permission to push apps from your PC via ADB. Allow it.
- To see your console debug output press Windows + R.
- Type in
cmdand press Enter. Type inmonitorand press Enter. - Look at the logcat tab for the logs.
- You may add a filter for the Application Name
com.bruce.valkyrieto only see the debug messages of the valkyrie app. - You can add a log output by using
ValkyrieDebug.Log("Hallo World");inside the source.
- Type in
- If you have no Android device or you want to test on different Android versions, you can use Android Studio to setup an emulator.
To build a release APK it should be signed. This is done automatically using the build.bat in the projects root dir. The process involves jarsigner.exe, which will use the user.keystore (keystore password: valkyrie, keypair password: valkyrie) from the JDK and the zipalign.exe from the Android build tools.
Screenshots can be made by holding Vol- + Power. Some devices need Home + Power for it to work.
- Home
- Developer Guide
- External Sites
- Quest Creation
- Custom Content Pack Creation
- Translations
- Troubleshooting
- Tutorials
- Valkyrie