From 00f5f785e6ecc7d0826d0bb5c79792956d57ae60 Mon Sep 17 00:00:00 2001 From: Milan Nikolic Date: Tue, 27 Feb 2024 07:54:10 +0100 Subject: [PATCH] Update android example --- examples/others/android/example/README.md | 9 +- .../example/android/AndroidManifest.xml | 4 +- .../android/example/android/build.gradle | 7 +- .../others/android/example/android/build.xml | 92 ------------------- .../example/android/project.properties | 2 - examples/others/android/example/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- 7 files changed, 10 insertions(+), 108 deletions(-) delete mode 100644 examples/others/android/example/android/build.xml delete mode 100644 examples/others/android/example/android/project.properties diff --git a/examples/others/android/example/README.md b/examples/others/android/example/README.md index 98468ce..6ef631d 100644 --- a/examples/others/android/example/README.md +++ b/examples/others/android/example/README.md @@ -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`. diff --git a/examples/others/android/example/android/AndroidManifest.xml b/examples/others/android/example/android/AndroidManifest.xml index 20cc5cf..19b1694 100644 --- a/examples/others/android/example/android/AndroidManifest.xml +++ b/examples/others/android/example/android/AndroidManifest.xml @@ -1,10 +1,9 @@ - + @@ -15,6 +14,7 @@ diff --git a/examples/others/android/example/android/build.gradle b/examples/others/android/example/android/build.gradle index 3bb73a0..b819fb4 100644 --- a/examples/others/android/example/android/build.gradle +++ b/examples/others/android/example/android/build.gradle @@ -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' } diff --git a/examples/others/android/example/android/build.xml b/examples/others/android/example/android/build.xml deleted file mode 100644 index 3e7a699..0000000 --- a/examples/others/android/example/android/build.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/others/android/example/android/project.properties b/examples/others/android/example/android/project.properties deleted file mode 100644 index 36b004b..0000000 --- a/examples/others/android/example/android/project.properties +++ /dev/null @@ -1,2 +0,0 @@ -# Project target. -target=android-27 diff --git a/examples/others/android/example/build.gradle b/examples/others/android/example/build.gradle index e9f7a57..301e2dd 100644 --- a/examples/others/android/example/build.gradle +++ b/examples/others/android/example/build.gradle @@ -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' } } diff --git a/examples/others/android/example/gradle/wrapper/gradle-wrapper.properties b/examples/others/android/example/gradle/wrapper/gradle-wrapper.properties index 9f7ad18..b05c5cc 100644 --- a/examples/others/android/example/gradle/wrapper/gradle-wrapper.properties +++ b/examples/others/android/example/gradle/wrapper/gradle-wrapper.properties @@ -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