mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Targetting android 29 issues a warning on new device that the apk contains security breaches. I've updated the target to Android 34 and made the necessary changes to build the apk. We still install build-tools and platform version 29 because version 34 has a bug in dx (renamed to d8) where it fails to link classes.dex
@ -109,13 +109,14 @@ public class NativeLoader extends android.app.NativeActivity {
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.raylib.game"
|
||||
android:versionCode="1" android:versionName="1.0" >
|
||||
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29"/>
|
||||
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="34"/>
|
||||
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<application android:allowBackup="false" android:label="Game" android:icon="@drawable/icon">
|
||||
<activity android:name="com.raylib.game.NativeLoader"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="true"
|
||||
android:screenOrientation="landscape" android:launchMode="singleTask"
|
||||
android:clearTaskOnLaunch="true">
|
||||
<meta-data android:name="android.app.lib_name" android:value="main"/>
|
||||
@ -254,14 +255,15 @@ for ABI in $ABIS; do
|
||||
done
|
||||
cd ../..
|
||||
|
||||
# Sign and zipalign APK
|
||||
# Zipalign APK and sign
|
||||
# NOTE: If you changed the storepass and keypass in the setup process, change them here too
|
||||
jarsigner -keystore android/raylib.keystore -storepass raylib -keypass raylib \
|
||||
-signedjar game.apk game.apk projectKey
|
||||
|
||||
$BUILD_TOOLS/zipalign -f 4 game.apk game.final.apk
|
||||
mv -f game.final.apk game.apk
|
||||
|
||||
# Install apksigner with `sudo apt install apksigner`
|
||||
apksigner sign --ks android/raylib.keystore --out my-app-release.apk --ks-pass pass:raylib game.apk
|
||||
mv my-app-release.apk game.apk
|
||||
|
||||
# Install to device or emulator
|
||||
android/sdk/platform-tools/adb install -r game.apk
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user