Repository: tauri
Issue: [bug] New app fails on android version < 12
Labels: type: bug,status: needs triage,platform: Android

### Describe the bug

Hi,

Thanks for this amazing project!

I tried to create a new empty project with `create-tauri-app` and it works fine on my recent phone (FP4) but crashes on my old table (android 7; Galaxy Tab S2).

If you need anything else, I will be happy to help but I don't have a lot of experience with Android.

### Reproduction

❯ cargo create-tauri-app --alpha
✔ Project name · second
✔ Choose which language to use for your frontend · TypeScript / JavaScript - (pnpm, yarn, npm)
✔ Choose your package manager · npm
✔ Choose your UI template · React - (https://reactjs.org/)
✔ Choose your UI flavor · TypeScript
✔ Would you like to setup the project for mobile as well? · yes

cd second
npm i
// change bundle identifer to com.second.dev
npm run tauri android init
npm run tauri android dev

### Expected behavior

The app should not crash

### Full `tauri info` output

```text
root@ubuntu:~$ npm run tauri info

> tauri-app@0.0.0 tauri
> tauri info


[✔] Environment
    - OS: Manjaro 23.1.3 X64
    ✔ webkit2gtk-4.1: 2.42.4
    ✔ rsvg2: 2.57.1
    ✔ rustc: 1.75.0 (82e1608df 2023-12-21)
    ✔ cargo: 1.75.0 (1d8b05cdd 2023-11-20)
    ✔ rustup: 1.26.0 (2023-11-14)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 21.5.0
    - npm: 10.3.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.2
    - tauri-build [RUST]: 2.0.0-beta.1
    - wry [RUST]: 0.35.2
    - tao [RUST]: 0.25.0
    - tauri-cli [RUST]: 2.0.0-beta.0
    - @tauri-apps/api [NPM]: 2.0.0-beta.0
    - @tauri-apps/cli [NPM]: 2.0.0-beta.1

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite
```


### Stack trace

```text
root@ubuntu:~$ npm run tauri android dev

> tauri-app@0.0.0 tauri
> tauri android dev

        Info Detected connected device: Galaxy Tab S2 (SM-T813) with target "aarch64-linux-android"
        Info Using 192.168.178.20 to access the development server.
     Running BeforeDevCommand (`npm run dev`)

> tauri-app@0.0.0 dev
> vite


  VITE v5.0.12  ready in 132 ms

  ➜  Local:   http://localhost:1420/
  ➜  Network: http://192.168.178.20:1420/
        Info detected host target triple "x86_64-unknown-linux-gnu"
   Compiling tauri v2.0.0-beta.2
   Compiling tauri-plugin-shell v2.0.0-beta.0
   Compiling tauri-app v0.0.0 (/media/data/rust/tmp2/tauri-app/src-tauri)
    Finished dev [unoptimized + debuginfo] target(s) in 2.20s
        Info symlinking lib "/media/data/rust/tmp2/tauri-app/src-tauri/target/aarch64-linux-android/debug/libtauri_app_lib.so" in jniLibs dir "/media/data/rust/tmp2/tauri-app/src-tauri/gen/android/app/src/main/jniLibs/arm64-v8a"
        Info "/media/data/rust/tmp2/tauri-app/src-tauri/target/aarch64-linux-android/debug/libtauri_app_lib.so" requires shared lib "libandroid.so"
        Info "/media/data/rust/tmp2/tauri-app/src-tauri/target/aarch64-linux-android/debug/libtauri_app_lib.so" requires shared lib "libdl.so"
        Info "/media/data/rust/tmp2/tauri-app/src-tauri/target/aarch64-linux-android/debug/libtauri_app_lib.so" requires shared lib "liblog.so"
        Info "/media/data/rust/tmp2/tauri-app/src-tauri/target/aarch64-linux-android/debug/libtauri_app_lib.so" requires shared lib "libm.so"
        Info "/media/data/rust/tmp2/tauri-app/src-tauri/target/aarch64-linux-android/debug/libtauri_app_lib.so" requires shared lib "libc.so"
        Info symlink at "/media/data/rust/tmp2/tauri-app/src-tauri/gen/android/app/src/main/jniLibs/arm64-v8a/libtauri_app_lib.so" points to "/media/data/rust/tmp2/tauri-app/src-tauri/target/aarch64-linux-android/debug/libtauri_app_lib.so"
<==========---> 81% EXECUTING [379ms]

> tauri-app@0.0.0 tauri
> tauri android android-studio-script --target aarch64

   Compiling tauri v2.0.0-beta.2s]
   Compiling tauri-plugin-shell v2.0.0-beta.0
   Compiling tauri-app v0.0.0 (/media/data/rust/tmp2/tauri-app/src-tauri)
    Finished dev [unoptimized + debuginfo] target(s) in 2.25s
        Info symlinking lib "/media/data/rust/tmp2/tauri-app/src-tauri/target/aarch64-linux-android/debug/libtauri_app_lib.so" in jniLibs dir "/media/data/rust/tmp2/tauri-app/src-tauri/gen/android/app/src/main/jniLibs/arm64-v8a"
        Info "/media/data/rust/tmp2/tauri-app/src-tauri/target/aarch64-linux-android/debug/libtauri_app_lib.so" requires shared lib "libandroid.so"
        Info "/media/data/rust/tmp2/tauri-app/src-tauri/target/aarch64-linux-android/debug/libtauri_app_lib.so" requires shared lib "libdl.so"
        Info "/media/data/rust/tmp2/tauri-app/src-tauri/target/aarch64-linux-android/debug/libtauri_app_lib.so" requires shared lib "liblog.so"
        Info "/media/data/rust/tmp2/tauri-app/src-tauri/target/aarch64-linux-android/debug/libtauri_app_lib.so" requires shared lib "libm.so"
        Info "/media/data/rust/tmp2/tauri-app/src-tauri/target/aarch64-linux-android/debug/libtauri_app_lib.so" requires shared lib "libc.so"

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/8.0/userguide/command_line_interface.html#sec:command_line_warnings
Performing Streamed Install
Success
Starting: Intent { cmp=com.tauri_app/.MainActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } }
        Info Watching /media/data/rust/tmp2/tauri-app/src-tauri for changes...
--------- beginning of main
02-05 23:20:53.197 11232 11232 E Zygote  : v2
--------- beginning of system
02-05 23:20:53.197 11232 11232 I libpersona: KNOX_SDCARD checking this for 10216
02-05 23:20:53.197 11232 11232 I libpersona: KNOX_SDCARD not a persona
02-05 23:20:53.198 11232 11232 E Zygote  : accessInfo : 0
02-05 23:20:53.199 11232 11232 W SELinux : SELinux selinux_android_compute_policy_index : Policy Index[2],  Con:u:r:zygote:s0 RAM:SEPF_SECMOBILE_7.0_0010, [-1 -1 -1 -1 0 1]
02-05 23:20:53.200 11232 11232 I SELinux : SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c512,c768, pkgname=com.tauri_app 
02-05 23:20:53.204 11232 11232 I art     : Late-enabling -Xcheck:jni
--------- beginning of crash
02-05 23:20:53.353 11232 11232 E AndroidRuntime: FATAL EXCEPTION: main
02-05 23:20:53.353 11232 11232 E AndroidRuntime: Process: com.tauri_app, PID: 11232
02-05 23:20:53.353 11232 11232 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Ljava/lang/BootstrapMethodError;
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at com.fasterxml.jackson.databind.util.ExceptionUtil.isFatal(ExceptionUtil.java:51)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at com.fasterxml.jackson.databind.util.ExceptionUtil.rethrowIfFatal(ExceptionUtil.java:31)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector.<clinit>(JacksonAnnotationIntrospector.java:70)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at com.fasterxml.jackson.databind.ObjectMapper.<clinit>(ObjectMapper.java:375)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at app.tauri.plugin.PluginManager.<init>(PluginManager.kt:58)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at com.tauri_app.TauriActivity.<init>(TauriActivity.kt:14)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at com.tauri_app.MainActivity.<init>(MainActivity.kt:3)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at java.lang.Class.newInstance(Native Method)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at android.app.Instrumentation.newActivity(Instrumentation.java:1086)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2836)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3042)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at android.app.ActivityThread.-wrap14(ActivityThread.java)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1639)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:102)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:154)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6780)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1500)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1390)
02-05 23:20:53.353 11232 11232 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "java.lang.BootstrapMethodError" on path: DexPathList[[zip file "/data/app/com.tauri_app-1/base.apk"],nativeLibraryDirectories=[/data/app/com.tauri_app-1/lib/arm64, /data/app/com.tauri_app-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
02-05 23:20:53.353 11232 11232 E AndroidRuntime:        ... 19 more
```


### Additional context

_No response_