This commit is contained in:
rootVIII 2021-05-31 00:50:09 -04:00
parent 0e6f67a575
commit 717f8f9097

View file

@ -49,12 +49,14 @@
gomobile build -target=android github.com/rootVIII/skulls/skullsgomobile gomobile build -target=android github.com/rootVIII/skulls/skullsgomobile
// 2. Install the newly created .apk into an already running Android Emulator: // 2. Install the newly created .apk into an already running Android Emulator:
adb -s <emulator-name> install skullsgomobile.apk adb -s <emulator-name> install skullsgomobile.apk
// Note: to list available emulators (including phone connected for debugging): // Note: to list available emulators (including phone connected for debugging):
adb devices -l adb devices -l
// 3. View debug/logging output from the game: // 3. View debug/logging output from the game:
adb logcat adb logcat
</code> </code>
@ -69,9 +71,11 @@ adb logcat
ebitenmobile bind -target android -javapkg com.&lt;your-username&gt;.skulls -o skulls.aar github.com/rootVIII/skulls/skullsebitenbind ebitenmobile bind -target android -javapkg com.&lt;your-username&gt;.skulls -o skulls.aar github.com/rootVIII/skulls/skullsebitenbind
// 2. Open an Empty Activity in Android Studio and name it SkullsMobile // 2. Open an Empty Activity in Android Studio and name it SkullsMobile
// 3. Import the new .aar as a module: // 3. Import the new .aar as a module:
// Select File, New, New Module, Import .jar/.aar Package, select the previously built .aar named skulls.aar // Select File, New, New Module, Import .jar/.aar Package, select the previously built .aar named skulls.aar
// In app/build.gradle, add this line to the dependencies: compile project(':skulls') // In app/build.gradle, add this line to the dependencies: compile project(':skulls')
@ -89,6 +93,7 @@ dependencies {
// Then follow screen prompts to sync the build.gradle change to the project // Then follow screen prompts to sync the build.gradle change to the project
// 4. Place the following in app/src/main/java/com.&lt;your username&gt;.skullsmobile/MainActivity.java: // 4. Place the following in app/src/main/java/com.&lt;your username&gt;.skullsmobile/MainActivity.java:
package com.&lt;your-username&gt;.skullsmobile; package com.&lt;your-username&gt;.skullsmobile;
@ -128,6 +133,7 @@ public class MainActivity extends AppCompatActivity {
} }
// 5. Add a separate error handling class in app/src/main/java/com.&lt;your-username&gt;skullsmobile/EbitenViewWithErrorHandling.java // 5. Add a separate error handling class in app/src/main/java/com.&lt;your-username&gt;skullsmobile/EbitenViewWithErrorHandling.java
package com.solsticenet.skullsmobile; package com.solsticenet.skullsmobile;
@ -156,6 +162,7 @@ class EbitenViewWithErrorHandling extends EbitenView {
} }
// 6. Add the below into app/src/main/res/AndroidManifest.xml: // 6. Add the below into app/src/main/res/AndroidManifest.xml:
&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
@ -175,6 +182,7 @@ class EbitenViewWithErrorHandling extends EbitenView {
&lt;/RelativeLayout&gt; &lt;/RelativeLayout&gt;
// 7. The game should now be usable in Android Studio (sign the project with developer keys, UI adjustments in AndroidManifest.xml etc.) // 7. The game should now be usable in Android Studio (sign the project with developer keys, UI adjustments in AndroidManifest.xml etc.)
</code> </code>
</pre> </pre>