Skip to content

[bug] java.lang.ClassNotFoundException: Didn't find class "app.tauri.opener.OpenerPlugin"Β #11974

@plog

Description

@plog

Describe the bug

Hi all,

A very basic Svelte app crashes on Android emulator with Caused by: java.lang.ClassNotFoundException: Didn't find class "app.tauri.opener.OpenerPlugin"

It works on macOS/iOS

What I tried:

  1. rm -rf src-tauri/gen/android and rm -rf src-tauri/target/*
  2. Re-run npm run tauri android init
  3. Reinstall a new device in Android Studio and retry 1. and 2.
  4. rustup update

npm run tauri android dev

Did try npm run tauri android dev --open but I don't know Studio well enough πŸ˜…

Reproduction

No response

Expected behavior

No response

Full tauri info output

[βœ”] Environment
    - OS: Mac OS 14.6.1 arm64 (X64)
    βœ” Xcode Command Line Tools: installed
    βœ” rustc: 1.83.0 (90b35a623 2024-11-26)
    βœ” cargo: 1.83.0 (5ffbef321 2024-10-29)
    βœ” rustup: 1.27.1 (54dd3d00f 2024-04-24)
    βœ” Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 22.12.0
    - npm: 10.9.0

[-] Packages
    - tauri πŸ¦€: 2.1.1
    - tauri-build πŸ¦€: 2.0.3
    - wry πŸ¦€: 0.47.2
    - tao πŸ¦€: 0.30.8
    - @tauri-apps/api : 2.1.1
    - @tauri-apps/cli : 2.1.0

[-] Plugins

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

Stack trace

12-15 12:57:17.254 10839 10839 W ziparchive: Unable to open '/data/app/~~pTORiwRf0py2Gqkl8kRkfQ==/com.proxibenef.app-RIPmsAHeG1MmFY5aE11jLQ==/base.dm': No such file or directory
12-15 12:57:17.254 10839 10839 W ziparchive: Unable to open '/data/app/~~pTORiwRf0py2Gqkl8kRkfQ==/com.proxibenef.app-RIPmsAHeG1MmFY5aE11jLQ==/base.dm': No such file or directory
12-15 12:57:17.358 10839 10839 D nativeloader: Configuring clns-7 for other apk /data/app/~~pTORiwRf0py2Gqkl8kRkfQ==/com.proxibenef.app-RIPmsAHeG1MmFY5aE11jLQ==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~pTORiwRf0py2Gqkl8kRkfQ==/com.proxibenef.app-RIPmsAHeG1MmFY5aE11jLQ==/lib/arm64:/data/app/~~pTORiwRf0py2Gqkl8kRkfQ==/com.proxibenef.app-RIPmsAHeG1MmFY5aE11jLQ==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.proxibenef.app
12-15 12:57:17.380   609   624 I AppsFilter: interaction: PackageSetting{50f354a com.proxibenef.app/10207} -> PackageSetting{53c7fa5 com.google.android.apps.nexuslauncher/10176} BLOCKED
12-15 12:57:17.405 10839 10839 D nativeloader: Load /data/app/~~pTORiwRf0py2Gqkl8kRkfQ==/com.proxibenef.app-RIPmsAHeG1MmFY5aE11jLQ==/base.apk!/lib/arm64-v8a/libproxibenef_lib.so using ns clns-7 from class loader (caller=/data/app/~~pTORiwRf0py2Gqkl8kRkfQ==/com.proxibenef.app-RIPmsAHeG1MmFY5aE11jLQ==/base.apk!classes7.dex): ok
12-15 12:57:17.532 10839 10839 W .proxibenef.app: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
12-15 12:57:17.532 10839 10839 W .proxibenef.app: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
12-15 12:57:17.544 10839 10839 E AndroidRuntime: Process: com.proxibenef.app, PID: 10839
12-15 12:57:17.544 10839 10839 E AndroidRuntime:        at com.proxibenef.app.WryActivity.getAppClass(WryActivity.kt:115)
12-15 12:57:17.544 10839 10839 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "app.tauri.opener.OpenerPlugin" on path: DexPathList[[zip file "/data/app/~~pTORiwRf0py2Gqkl8kRkfQ==/com.proxibenef.app-RIPmsAHeG1MmFY5aE11jLQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~pTORiwRf0py2Gqkl8kRkfQ==/com.proxibenef.app-RIPmsAHeG1MmFY5aE11jLQ==/lib/arm64, /data/app/~~pTORiwRf0py2Gqkl8kRkfQ==/com.proxibenef.app-RIPmsAHeG1MmFY5aE11jLQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
12-15 12:57:17.546 10839 10858 F libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 10858 (.proxibenef.app), pid 10839 (.proxibenef.app)

Additional context

Platform infos

Java

java --version
openjdk 21.0.3 2024-04-16
OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
OpenJDK 64-Bit Server VM (build 21.0.3+-79915917-b509.11, mixed mode)

Android Studio / Emulator

Android Studio Ladybug | 2024.2.1 Patch 3
Build #AI-242.23339.11.2421.12700392, built on November 23, 2024

# adb devices -l
List of devices attached
emulator-5554          device product:sdk_gphone64_arm64 model:sdk_gphone64_arm64 device:emu64a transport_id:1
# adb -s emulator-5554 shell getprop ro.build.version.release
15

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions