Skip to content

Commit

Permalink
Update android example
Browse files Browse the repository at this point in the history
  • Loading branch information
gen2brain committed Feb 27, 2024
1 parent 069b39e commit 00f5f78
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 108 deletions.
9 changes: 2 additions & 7 deletions examples/others/android/example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,11 @@ To build apk export path to Android SDK, point to location where you unpacked ar

export ANDROID_HOME=/opt/android-sdk

And build apk with ant:

cd android
ant clean debug

Or with gradle:
And build apk:

./gradlew assembleDebug

If everything is successfully built apk can be found in bin/ directory or in the android/build/outputs in case `gradle` is used.
If everything is successfully built apk can be found in the android/build/outputs.


For aarch64/arm64 replace `arm-linux-androideabi` with `aarch64-linux-android`, set GOARCH to arm64 and use minimum `ANDROID_API=21`.
4 changes: 2 additions & 2 deletions examples/others/android/example/android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.gen2brain.raylib.go"
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="27" />
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="34" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />

<!-- We do not have Java code. Therefore android:hasCode is set to false. -->
Expand All @@ -15,6 +14,7 @@

<!-- Our activity is the built-in NativeActivity framework class. -->
<activity android:name="android.app.NativeActivity"
android:exported="true"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="landscape"
android:clearTaskOnLaunch="true">
Expand Down
7 changes: 4 additions & 3 deletions examples/others/android/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
namespace = "com.example.android"
compileSdkVersion 34
buildToolsVersion '34.0.0'

defaultConfig {
applicationId "com.example.android"
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 34
versionCode 1
versionName '1.0'
}
Expand Down
92 changes: 0 additions & 92 deletions examples/others/android/example/android/build.xml

This file was deleted.

2 changes: 0 additions & 2 deletions examples/others/android/example/android/project.properties

This file was deleted.

2 changes: 1 addition & 1 deletion examples/others/android/example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:8.2.2'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip

0 comments on commit 00f5f78

Please sign in to comment.