Bug 1520 - Android: Ensure Android 11 (API 30) + 14 (API 34) Compatibility
Summary: Android: Ensure Android 11 (API 30) + 14 (API 34) Compatibility
Status: RESOLVED FIXED
Alias: None
Product: Gluegen
Classification: JogAmp
Component: core (show other bugs)
Version: 2.6.0
Hardware: All other
: P4 normal
Assignee: Sven Gothel
URL:
Depends on: 1523
Blocks:
  Show dependency treegraph
 
Reported: 2025-07-14 00:06 CEST by Sven Gothel
Modified: 2025-08-25 04:31 CEST (History)
0 users

See Also:
Type: DEFECT
SCM Refs:
gluegen 4a385f0c06b0117ded3fca87bc433f157bfca6a1 gluegen 605815987d11b458b102cc549ed870a69fe9b95e gluegen 1afa0e423e5c949976395a05dba35ee0e6eb7ee9 gluegen 35896e7984b8047282df474b76eadb20eb6bddda gluegen 5400c3ce900b3be7472ff36b33ff7751686d2c1f gluegen 3e559767bc58891191ff4d77462dfbb203c9b045 joal 17ec23123afd4ef1472fdd887b0441e4479304af jogl 021d537b774b7077509b25bfcefedcc477ed5bc3 jogl 2f3985b2afcc1c8d94ef3e1a1a4c88c85976f273 jogl c1a2b231ec8f36f7528859a77dd8c4990c36ec9a jogl 342b4d4426d88f5b70ac1a2446e42750314e6431 jogl 389090e98620297133f86b6dfcabf6bfc02d1345 jogl e5035211b2f1354a52a5487a33de79103af52429
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2025-07-14 00:06:19 CEST
Android 11 (SDK API 30): Package visibility in Android 11
- PackageManager.getApplicationInfo() fails with NameNotFoundException
- See <https://developer.android.com/training/package-visibility>
- Solution: Add query in users' apk or JogAmp AndroidLauncher `jogamp.android.launcher` manifest
  - See <https://developer.android.com/guide/topics/manifest/queries-element>

Android 11 (SDK API 30): Requires version min. request <= JNI_VERSION_1_6, JNI_VERSION_1_8 is rejected.
- In general, we can ask for a JNI_VERSION_1_6 min required version across all modules.

Android 14 (SDK API 34): Writable dex file is not allowed
- See <https://www.webviewgold.com/support-center/knowledgebase/solving-the-writable-dex-file-is-not-allowed-crash-in-android-apps/>
- Solution: Mark destination apk dex-file read-only
Comment 1 Sven Gothel 2025-07-14 02:38:16 CEST
Android: Ensure activities include `android:exported="true"`
Comment 2 Sven Gothel 2025-07-14 03:00:16 CEST
commit 35896e7984b8047282df474b76eadb20eb6bddda
    Android: Add android-stripped.jar (API 24) less java.* packages, avoiding collisions w/ Eclipse editor
Comment 3 Sven Gothel 2025-07-14 03:01:10 CEST
commit 5400c3ce900b3be7472ff36b33ff7751686d2c1f
    Eclipse: Use android-stripped.jar in .classpath (via use library)
Comment 4 Sven Gothel 2025-07-21 13:46:30 CEST
Android: Min API 24 -> 26
    
Desugaring w/ adding missing classes didn't work out well,
hence we are still in a Java 8 API situation within JogAmp
until using Android API 32 (Version 12) w/ full Java 11 support (?).
    
See <https://developer.android.com/build/jdks>
Comment 5 Sven Gothel 2025-08-25 04:31:51 CEST
For a standalone Android bring-up test w/ demos (also included in the apk folder release/RC folder):

The fat demo APK jogl-demos-fat-android-${arch}.apk inside the jogl build folder can be directly installed and tested on your device w/ developer mode enabled.