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

master
samsvp 11 月之前
父節點
當前提交
e4d70d8c50
共有 1 個檔案被更改,包括 7 行新增5 行删除
  1. +7
    -5
      Working-for-Android-(on-Linux).md

+ 7
- 5
Working-for-Android-(on-Linux).md

@ -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
```

Loading…
取消
儲存