tauri-apps/tauri

[bug] Failed to assemble APK

Opened this issue · 0 comments

Describe the bug

Failed to build the app for Android with Svelte template

Reproduction

cargo create-tauri-app
Choose Typescript/Javascript
pnpm as package manager
Svelte as UI template
Typescript
cd tauri-app
pnpm i
cargo tauri android init
cargo tauri android dev

Expected behavior

build and run successfully

Full tauri info output

[✔] Environment
    - OS: Arch Linux Rolling Release x86_64 (X64)
    ✔ webkit2gtk-4.1: 2.46.2
    ✔ rsvg2: 2.59.1
    ✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
    ✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (environment override by RUSTUP_TOOLCHAIN)
    - node: 22.9.0
    - pnpm: 9.12.1
    - yarn: 1.22.22
    - npm: 10.9.0

[-] Packages
    - tauri 🦀: 2.0.6
    - tauri-build 🦀: 2.0.2
    - wry 🦀: 0.46.3
    - tao 🦀: 0.30.3
    - tauri-cli 🦀: 2.0.4
    - @tauri-apps/api : 2.0.3
    - @tauri-apps/cli : 2.0.5

[-] Plugins
    - tauri-plugin-shell 🦀: 2.0.2
    - @tauri-apps/plugin-shell : 2.0.1

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../build
    - devUrl: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite

Stack trace

Finished `dev` profile [unoptimized + debuginfo] target(s) in 36.51s
    Info symlinking lib "/home/fabric/tauri-app/src-tauri/target/x86_64-linux-android/debug/libtauri_app_lib.so" in jniLibs dir "/home/fabric/tauri-app/src-tauri/gen/android/app/src/main/jniLibs/x86_64"
    Info "/home/fabric/tauri-app/src-tauri/target/x86_64-linux-android/debug/libtauri_app_lib.so" requires shared lib "libandroid.so"
    Info "/home/fabric/tauri-app/src-tauri/target/x86_64-linux-android/debug/libtauri_app_lib.so" requires shared lib "libdl.so"
    Info "/home/fabric/tauri-app/src-tauri/target/x86_64-linux-android/debug/libtauri_app_lib.so" requires shared lib "liblog.so"
    Info "/home/fabric/tauri-app/src-tauri/target/x86_64-linux-android/debug/libtauri_app_lib.so" requires shared lib "libm.so"
    Info "/home/fabric/tauri-app/src-tauri/target/x86_64-linux-android/debug/libtauri_app_lib.so" requires shared lib "libc.so"
    Info symlink at "/home/fabric/tauri-app/src-tauri/gen/android/app/src/main/jniLibs/x86_64/libtauri_app_lib.so" points to "/home/fabric/tauri-app/src-tauri/target/x86_64-linux-android/debug/libtauri_app_lib.so"

FAILURE: Build failed with an exception.

* Where:
Settings file '/home/fabric/tauri-app/src-tauri/gen/android/settings.gradle' line: 3

* What went wrong:
A problem occurred evaluating settings 'android'.
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 67

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 427ms
    Error Failed to assemble APK: command ["/home/fabric/tauri-app/src-tauri/gen/android/gradlew", "--project-dir", "/home/fabric/tauri-app/src-tauri/gen/android"] exited with code 1:

Additional context

No response