readme
This commit is contained in:
parent
a2b00c4d5c
commit
51ccdc7ee3
1 changed files with 16 additions and 20 deletions
36
README.md
36
README.md
|
@ -22,10 +22,10 @@
|
||||||
Android Studio should be downloaded/installed; the AVD emulators are free and convenient
|
Android Studio should be downloaded/installed; the AVD emulators are free and convenient
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
I typically use a pixel4 emulator.
|
I use the AVD emulators that are installable with Android Studio and stored in $ANDROID_HOME/emulator/emulator
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
I store an alias in my profile to open an emulator easily via the terminal: <code>alias pixel4='$ANDROID_HOME/emulator/emulator -avd "Pixel_4_API_30"'</code>
|
I store an alias in my profile to open an emulator via simple command such as pixel4: <code>alias pixel4='$ANDROID_HOME/emulator/emulator -avd "Pixel_4_API_30"'</code>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
Font used for text: <a href="https://www.dafont.com/radioland.font">RADIOLAND.TTF</a>
|
Font used for text: <a href="https://www.dafont.com/radioland.font">RADIOLAND.TTF</a>
|
||||||
|
@ -40,18 +40,16 @@
|
||||||
<pre>
|
<pre>
|
||||||
<code>
|
<code>
|
||||||
// 1.
|
// 1.
|
||||||
// Navigate to skulls/ and generate a <code>.apk</code> with skullsgomobile/:
|
// Navigate to skulls/ and generate a <code>.apk</code> with gomobile:
|
||||||
gomobile build -target=android github.com/rootVIII/skulls/skullsgomobile
|
gomobile build -target=android github.com/rootVIII/skulls/skullsgomobile
|
||||||
|
|
||||||
|
|
||||||
// 2.
|
// 2. Install the newly created .apk into an already running Android Emulator:
|
||||||
// Install the newly created .apk into an already running Android Emulator (from Android Studio):
|
adb -s <emulator-name> install skullsgomobile.apk
|
||||||
adb -s emulator-5554 install skullsgomobile.apk
|
|
||||||
// Note: to list available emulators: adb devices -l
|
// Note: to list available emulators: adb devices -l
|
||||||
|
|
||||||
|
|
||||||
// 3.
|
// 3. View logging output from the game:
|
||||||
// View logging output from the game:
|
|
||||||
adb logcat
|
adb logcat
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,19 +61,18 @@ adb logcat
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
<code>
|
<code>
|
||||||
// 1.
|
// 1. Navigate to skulls/ and generate the <code>.aar</code> binding:
|
||||||
// Navigate to skulls/ and generate the <code>.aar</code> binding:
|
|
||||||
ebitenmobile bind -target android -javapkg com.<your-username>.skulls -o skulls.aar github.com/rootVIII/skulls/skullsebitenbind
|
ebitenmobile bind -target android -javapkg com.<your-username>.skulls -o skulls.aar github.com/rootVIII/skulls/skullsebitenbind
|
||||||
|
|
||||||
|
|
||||||
// 2.
|
// 2. Open an Empty Activity in Android Studio and name it SkullsMobile
|
||||||
// Open an Empty Activity in Android Studio and name it SkullsMobile
|
|
||||||
|
|
||||||
|
|
||||||
// 3.
|
// 3. Import the new .aar as a module:
|
||||||
// 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')
|
||||||
|
// Example:
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'androidx.appcompat:appcompat:1.3.0'
|
implementation 'androidx.appcompat:appcompat:1.3.0'
|
||||||
implementation 'com.google.android.material:material:1.3.0'
|
implementation 'com.google.android.material:material:1.3.0'
|
||||||
|
@ -88,8 +85,8 @@ dependencies {
|
||||||
// Then synch the change to the build.gradle for the project
|
// Then synch the change to the build.gradle for the project
|
||||||
|
|
||||||
|
|
||||||
// 4.
|
// 4. Place the following in app/src/main/java/com.<your username>.skullsmobile/MainActivity.java:
|
||||||
// Place the following in app/src/main/java/<your username>/MainActivity.java:
|
|
||||||
package com.<your-username>.skullsmobile;
|
package com.<your-username>.skullsmobile;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
@ -127,8 +124,8 @@ public class MainActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 5.
|
// 5. Add a separate error handling class in app/src/main/java/com.<your-username>skullsmobile/EbitenViewWithErrorHandling.java
|
||||||
// Add a separate error handling class in app/src/main/java/<your-username>/EbitenViewWithErrorHandling.java
|
|
||||||
package com.solsticenet.skullsmobile;
|
package com.solsticenet.skullsmobile;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
@ -155,8 +152,7 @@ class EbitenViewWithErrorHandling extends EbitenView {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 6.
|
// 6. Add the below into app/src/main/res/AndroidManifest.xml:
|
||||||
// Add the below into app/src/main/res/AndroidManifest.xml:
|
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
|
Loading…
Add table
Reference in a new issue