Repository: tauri
Issue: android Demo Greet function is not work[bug] 
Labels: type: bug,status: needs triage,platform: Android

### Describe the bug

After it is successfully compiled into an Android app, click the Greet button to report an error

`> :app:rustBuildArm64Debug                                       Compiling wry v0.35.1UTING [7s]
   Compiling tauri v2.0.0-alpha.20dr=127.0.0.1:63516 conn_id=0
   Compiling tauri-app-alpha v0.0.0 (E:\DIY_App\rust\rust_tauri\tauri-app-alpha\src-tauri)
   Compiling tauri-runtime-wry v1.0.0-alpha.8
   Compiling tauri-plugin-shell v2.0.0-alpha.6
    Finished dev [unoptimized + debuginfo] target(s) in 18.74s
        Info symlinking lib "E:\\DIY_App\\rust\\rust_tauri\\tauri-app-alpha\\src-tauri\\target\\aarch64-linux-android\\debug\\libuni_hotkeyx_alpha_lib.so" in jniLibs dir "E:\\DIY_App\\rust\\rust_tauri\\tauri-app-alpha\\src-tauri\\gen/android\\app/src/main/jniLibs/arm64-v8a"
        Info "E:\\DIY_App\\rust\\rust_tauri\\tauri-app-alpha\\src-tauri\\target\\aarch64-linux-android\\debug\\libuni_hotkeyx_alpha_lib.so" requires shared lib "libandroid.so"
        Info "E:\\DIY_App\\rust\\rust_tauri\\tauri-app-alpha\\src-tauri\\target\\aarch64-linux-android\\debug\\libuni_hotkeyx_alpha_lib.so" requires shared lib "libdl.so"
        Info "E:\\DIY_App\\rust\\rust_tauri\\tauri-app-alpha\\src-tauri\\target\\aarch64-linux-android\\debug\\libuni_hotkeyx_alpha_lib.so" requires shared lib "liblog.so"
        Info "E:\\DIY_App\\rust\\rust_tauri\\tauri-app-alpha\\src-tauri\\target\\aarch64-linux-android\\debug\\libuni_hotkeyx_alpha_lib.so" requires shared lib "libm.so"
        Info "E:\\DIY_App\\rust\\rust_tauri\\tauri-app-alpha\\src-tauri\\target\\aarch64-linux-android\\debug\\libuni_hotkeyx_alpha_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.uni_hotkeyx_alpha/.MainActivity }
--------- beginning of main
01-01 13:10:42.866 15282 15282 I i_hotkeyx_alph: Late-enabling -Xcheck:jni
01-01 13:10:42.887 15282 15282 E i_hotkeyx_alph: Unknown bits set in runtime_flags: 0x8000
01-01 13:10:42.888 15282 15282 I i_hotkeyx_alph: Reinit property: dalvik.vm.checkjni= false
01-01 13:10:42.888 15282 15282 I i_hotkeyx_alph: ReInitProperties: persist.vm.debug.dumpapi= false
--------- beginning of system
01-01 13:10:42.933 15282 15774 I ActivityThread: Init compatible state: true
01-01 13:10:42.934 15282 15774 I HwFrameworkSecurityPartsFactory: add HwFrameworkSecurityPartsFactory to memory.
01-01 13:10:42.947 15282 15774 I BehaviorCollectManager: bindAnalyzerService: huawei.android.security.IAppBehaviorDataAnalyzer$Stub$Proxy@548baea pid:15282
01-01 13:10:43.088 15282 15774 I HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.tauri.uni_hotkeyx_alpha#10348#256
01-01 13:10:43.088 15282 15774 I HwApiCacheMangerEx: need clear apicache,because volumes changed,oldCnt=0 newCnt=1
01-01 13:10:43.089 15282 15774 I HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.tauri.uni_hotkeyx_alpha#10348#0
01-01 13:10:43.089 15282 15774 I HwApiCacheMangerEx: need clear apicache,because volumes changed,oldCnt=1 newCnt=1
01-01 13:10:43.097 15282 15282 I ActivityThread: finishPreloaded preloadStatus 0
01-01 13:10:43.182 15282 15816 E AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@ebd0025
01-01 13:10:43.189 15282 15774 I HwPartIawareFactory: add android.common.HwPartIawareFactoryImpl to memory.
01-01 13:10:43.189 15282 15774 I AwareBitmapCacher: init processName:com.tauri.uni_hotkeyx_alpha pid=15282 uid=10348
01-01 13:10:43.679 15282 15282 I DecorView[]:  old windowMode:0 new windoMode:1
01-01 13:10:43.701 15282 15282 W i_hotkeyx_alph: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
01-01 13:10:43.701 15282 15282 W i_hotkeyx_alph: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
01-01 13:10:43.703 15282 15282 I HwPartMagicWindowFactory: add android.common.HwPartMagicWindowFactoryImpl to memory.
01-01 13:10:43.712 15282 15282 I HwPartPowerOfficeFactory: add HwPartPowerOfficeFactoryImpl to memory.
01-01 13:10:43.729 15282 15282 I RmeSchedManager: init Rme, version is: v1.0
01-01 13:10:43.746 15282 15809 I FrameFlow: FrameFlowInit app is not supported by frameflow solution
01-01 13:10:43.746 15282 15809 I iGraphics: [0020080c] pn: com.tauri.uni_hotkeyx_alpha, p: 15282
01-01 13:10:43.746 15282 15809 I iGraphics: [0030080c] no spt app: com.tauri.uni_hotkeyx_alpha
01-01 13:10:43.754 15282 15809 I         : package[com.tauri.uni_hotkeyx_alpha] pid[15282] game[0]
01-01 13:10:43.759 15282 15809 W Gralloc3: mapper 3.x is not supported
01-01 13:10:43.778 15282 15282 I HwViewRootImpl: removeInvalidNode jank list is null
01-01 13:10:43.782 15282 15282 I WebViewFactory: Loading com.huawei.webview version 10.0.0.311 (code 387)
01-01 13:10:43.799 15282 15282 I cr_LibraryLoader: Time to load native libraries: 1 ms
01-01 13:10:43.801 15282 15910 I cr_PathUtils: Get data directory:/data/user/0/com.tauri.uni_hotkeyx_alpha/app_hws_webview
01-01 13:10:43.810 15282 15282 I hwschromium-387: [INFO:library_loader_hooks.cc(51)] Chromium logging enabled: level = 0, default verbosity = 0
01-01 13:10:43.810 15282 15817 I RustStdoutStderr: [INFO:library_loader_hooks.cc(51)] Chromium logging enabled: level = 0, default verbosity = 0
01-01 13:10:43.811 15282 15282 I cr_LibraryLoader: Expected native library version number "78.0.3904.108", actual native library version number "78.0.3904.108"
01-01 13:10:43.814 15282 15282 W i_hotkeyx_alph: Accessing hidden method Landroid/app/ActivityThread;->currentActivityThread()Landroid/app/ActivityThread; (greylist, reflection, allowed)
01-01 13:10:43.814 15282 15282 W i_hotkeyx_alph: Accessing hidden method Landroid/app/ActivityThread;->getProcessName()Ljava/lang/String; (greylist, reflection, allowed)
01-01 13:10:43.816 15282 15914 W cr_ChildProcLH: Create a new ChildConnectionAllocator with package name = com.huawei.webview, sandboxed = true
01-01 13:10:43.818 15282 15914 W i_hotkeyx_alph: Accessing hidden method Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z (greylist, reflection, allowed)
01-01 13:10:43.819 15282 15282 I cr_BrowserStartup: Initializing chromium process, singleProcess=false
01-01 13:10:43.821 15282 15282 I hwschromium-387: [INFO:apk_assets.cc(20)] open apk asset:assets/natives_blob.bin
01-01 13:10:43.821 15282 15817 I RustStdoutStderr: [INFO:apk_assets.cc(20)] open apk asset:assets/natives_blob.bin
01-01 13:10:43.822 15282 15282 I hwschromium-387: [INFO:apk_assets.cc(20)] open apk asset:assets/snapshot_blob_32.bin
01-01 13:10:43.822 15282 15282 I hwschromium-387: [INFO:apk_assets.cc(20)] open apk asset:assets/snapshot_blob_64.bin
01-01 13:10:43.822 15282 15282 I hwschromium-387: [INFO:apk_assets.cc(20)] open apk asset:assets/icudtl.dat
01-01 13:10:43.822 15282 15282 I hwschromium-387: [INFO:content_main_runner_impl.cc(217)] Load v8-snapshot from file v8_snapshot_64_data
01-01 13:10:43.823 15282 15817 I RustStdoutStderr: [INFO:apk_assets.cc(20)] open apk asset:assets/snapshot_blob_32.bin
01-01 13:10:43.823 15282 15817 I RustStdoutStderr: [INFO:apk_assets.cc(20)] open apk asset:assets/snapshot_blob_64.bin
01-01 13:10:43.823 15282 15817 I RustStdoutStderr: [INFO:apk_assets.cc(20)] open apk asset:assets/icudtl.dat
01-01 13:10:43.823 15282 15817 I RustStdoutStderr: [INFO:content_main_runner_impl.cc(217)] Load v8-snapshot from file v8_snapshot_64_data
01-01 13:10:43.824 15282 15282 I hwschromium-387: [INFO:apk_assets.cc(20)] open apk asset:assets/chrome_100_percent.pak
01-01 13:10:43.824 15282 15817 I RustStdoutStderr: [INFO:apk_assets.cc(20)] open apk asset:assets/chrome_100_percent.pak
01-01 13:10:43.825 15282 15282 I hwschromium-387: [INFO:apk_assets.cc(20)] open apk asset:assets/stored-locales/zh-CN.pak
01-01 13:10:43.825 15282 15817 I RustStdoutStderr: [INFO:apk_assets.cc(20)] open apk asset:assets/stored-locales/zh-CN.pak
01-01 13:10:43.825 15282 15282 I hwschromium-387: [INFO:apk_assets.cc(20)] open apk asset:assets/resources.pak
01-01 13:10:43.825 15282 15817 I RustStdoutStderr: [INFO:apk_assets.cc(20)] open apk asset:assets/resources.pak
01-01 13:10:43.832 15282 15282 I HwApsImpl: scaleDisplayModeInRog, return new display mode = {id=2, width=1152, height=2376, fps=60.000004}
01-01 13:10:43.834 15282 15922 W hwschromium-387: [WARNING:dns_config_service_posix.cc(341)] Failed to read DnsConfig.
01-01 13:10:43.834 15282 15817 I RustStdoutStderr: [WARNING:dns_config_service_posix.cc(341)] Failed to read DnsConfig.
01-01 13:10:43.840 15282 15932 I hwschromium-387: [INFO:cookie_manager.cc(354)] Execute Async Setting CookieManager Start
01-01 13:10:43.840 15282 15817 I RustStdoutStderr: [INFO:cookie_manager.cc(354)] Execute Async Setting CookieManager Start
01-01 13:10:43.841 15282 15932 I hwschromium-387: [INFO:cookie_manager.cc(378)] Execute Async Setting CookieManager End
01-01 13:10:43.841 15282 15817 I RustStdoutStderr: [INFO:cookie_manager.cc(378)] Execute Async Setting CookieManager End
01-01 13:10:43.866 15282 15282 W i_hotkeyx_alph: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;-><init>(Landroid/content/Context;I)V (greylist, reflection, allowed)
01-01 13:10:43.866 15282 15282 W i_hotkeyx_alph: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker;->logEvent(Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;)V (greylist, reflection, allowed)
01-01 13:10:43.866 15282 15282 W i_hotkeyx_alph: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionStarted(I)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
01-01 13:10:43.866 15282 15282 W i_hotkeyx_alph: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(II)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
01-01 13:10:43.866 15282 15282 W i_hotkeyx_alph: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
01-01 13:10:43.866 15282 15282 W i_hotkeyx_alph: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionModified(IILandroid/view/textclassifier/TextSelection;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
01-01 13:10:43.866 15282 15282 W i_hotkeyx_alph: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(III)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
01-01 13:10:43.866 15282 15282 W i_hotkeyx_alph: Accessing hidden method Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent;->selectionAction(IIILandroid/view/textclassifier/TextClassification;)Landroid/view/textclassifier/logging/SmartSelectionEventTracker$SelectionEvent; (greylist, reflection, allowed)
01-01 13:10:43.900 15282 15282 I WebViewChromium: isForceDarkIn3rdBlackList=false
01-01 13:10:43.900 15282 15282 I AwSettings: setForceDarkMode forceDarkMode = 1
01-01 13:10:43.909 15282 15282 W InputMethodManager: startInputReason = 1
01-01 13:10:43.919 15282 15282 I FrameFlow: FrameFlowInit app is not supported by frameflow solution
01-01 13:10:43.936 15282 15920 W i_hotkeyx_alph: Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (greylist, reflection, allowed)
01-01 13:10:43.939 15282 15282 W InputMethodManager: startInputReason = 5
01-01 13:10:43.939 15282 15914 I hwschromium-387: [INFO:apk_assets.cc(20)] open apk asset:assets/natives_blob.bin
01-01 13:10:43.939 15282 15817 I RustStdoutStderr: [INFO:apk_assets.cc(20)] open apk asset:assets/natives_blob.bin
01-01 13:10:43.940 15282 15914 I hwschromium-387: [INFO:apk_assets.cc(20)] open apk asset:assets/snapshot_blob_32.bin
01-01 13:10:43.940 15282 15817 I RustStdoutStderr: [INFO:apk_assets.cc(20)] open apk asset:assets/snapshot_blob_32.bin
01-01 13:10:43.940 15282 15914 I hwschromium-387: [INFO:apk_assets.cc(20)] open apk asset:assets/snapshot_blob_64.bin
01-01 13:10:43.940 15282 15817 I RustStdoutStderr: [INFO:apk_assets.cc(20)] open apk asset:assets/snapshot_blob_64.bin
01-01 13:10:43.941 15282 15920 W cr_media: Requires BLUETOOTH permission
01-01 13:10:43.944 15282 15914 I cr_ChildProcLauncher: on connect callback, pid=15924
01-01 13:10:43.965 15282 15959 W VideoCapabilities: Unsupported mime video/avs3
01-01 13:10:43.967 15282 15959 W VideoCapabilities: Unrecognized profile/level 0/0 for video/mpeg2
01-01 13:10:43.967 15282 15959 W VideoCapabilities: Unrecognized profile/level 0/2 for video/mpeg2
01-01 13:10:43.967 15282 15959 W VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
01-01 13:10:43.967 15282 15959 I VideoCapabilities: Unsupported profile 5 for video/mpeg2
01-01 13:10:43.967 15282 15959 I chatty  : uid=10348(com.tauri.uni_hotkeyx_alpha) Chrome_InProcGp identical 2 lines
01-01 13:10:43.967 15282 15959 I VideoCapabilities: Unsupported profile 5 for video/mpeg2
01-01 13:10:43.967 15282 15959 W VideoCapabilities: Unrecognized profile/level 1/32 for video/mp4v-es
01-01 13:10:43.967 15282 15959 W VideoCapabilities: Unrecognized profile/level 32768/2 for video/mp4v-es
01-01 13:10:43.967 15282 15959 W VideoCapabilities: Unrecognized profile/level 32768/64 for video/mp4v-es
01-01 13:10:43.980 15282 15959 W cr_MediaCodecUtil: HW encoder for video/avc is not available on this device.
01-01 13:10:44.013 15282 15282 E Tauri/Console: File: http://tauri.localhost/ - Line 85 - Msg: Uncaught SyntaxError: Unexpected token '.'
01-01 13:10:44.013 15282 15282 E Tauri/Console: File: http://tauri.localhost/ - Line 442 - Msg: Uncaught SyntaxError: Unexpected token '.'
        Info Watching E:\DIY_App\rust\rust_tauri\tauri-app-alpha\src-tauri for changes...
01-01 13:10:44.249 15282 15918 E hwschromium-387: [ERROR:network_service_network_delegate.cc(243)] final url ws://*** error_code: -173
01-01 13:10:44.249 15282 15817 I RustStdoutStderr: [ERROR:network_service_network_delegate.cc(243)] final url ws://*** error_code: -173
01-01 13:10:46.672 15282 15282 I Hwaps   : APS: EventAnalyzed: initAPS: version is 11.0.0.4
01-01 13:10:46.680 15282 15282 W Settings: Setting device_provisioned has moved from android.provider.Settings.Secure to android.provider.Settings.Global.
01-01 13:10:46.739 15282 15282 W HwApsManager: HwApsManagerService, registerCallback, start !
01-01 13:10:46.767 15282 15282 W InputMethodManager: startInputReason = 4
01-01 13:10:46.773 15282 15282 W InputMethodManager: startInputReason = 3
01-01 13:10:46.776 15282 15282 I InputMethodManager: showSoftInput
01-01 13:10:46.798 15282 15282 I AssistStructure: Flattened final assist data: 1536 bytes, containing 1 windows, 5 views
01-01 13:10:48.190 15282 15282 I AwareBitmapCacher: init lrucache size: 4194304 pid=15282
01-01 13:11:12.739 15282 15282 W Tauri/Console: File: http://tauri.localhost/node_modules/.vite/deps/vue.js?v=556aa0cc - Line 1486 - Msg: [Vue warn]: Unhandled error during execution of native event handler
01-01 13:11:12.739 15282 15282 W Tauri/Console:   at <Greet>
01-01 13:11:12.739 15282 15282 W Tauri/Console:   at <App>
01-01 13:11:12.741 15282 15282 W InputMethodManager: startInputReason = 3
01-01 13:11:12.746 15282 15282 E Tauri/Console: File: http://tauri.localhost/node_modules/.vite/deps/@tauri-apps_api_core.js?v=556aa0cc - Line 64 - Msg: Uncaught (in promise) TypeError: window.__TAURI_INTERNALS__.invoke is not a function
01-01 13:11:13.305 15282 15282 I FpsDetector: SendFpsToService: 0;0;0;0;0;100;0;0;0;
01-01 13:11:13.300 15282 15282 W i_hotkeyx_alpha: type=1400 audit(0.0:8087443): avc: denied { ioctl } for pid=15282 path="/proc/15282/rtg" dev="proc" ino=176405465 ioctlcmd=0xab22 scontext=u:r:untrusted_app:s0:c92,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c92,c257,c512,c768 tclass=file permissive=0
01-01 13:11:13.338 15282 15282 W Tauri/Console: File: http://tauri.localhost/node_modules/.vite/deps/vue.js?v=556aa0cc - Line 1486 - Msg: [Vue warn]: Unhandled error during execution of native event handler
01-01 13:11:13.338 15282 15282 W Tauri/Console:   at <Greet>
01-01 13:11:13.338 15282 15282 W Tauri/Console:   at <App>
01-01 13:11:13.340 15282 15282 E Tauri/Console: File: http://tauri.localhost/node_modules/.vite/deps/@tauri-apps_api_core.js?v=556aa0cc - Line 64 - Msg: Uncaught (in promise) TypeError: window.__TAURI_INTERNALS__.invoke is not a function
01-01 13:11:13.356 15282 15282 W i_hotkeyx_alpha: type=1400 audit(0.0:8087444): avc: denied { ioctl } for pid=15282 path="/proc/15282/rtg" dev="proc" ino=176405465 ioctlcmd=0xab20 scontext=u:r:untrusted_app:s0:c92,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c92,c257,c512,c768 tclass=file permissive=0
01-01 13:11:13.368 15282 15282 W i_hotkeyx_alpha: type=1400 audit(0.0:8087445): avc: denied { ioctl } for pid=15282 path="/proc/15282/rtg" dev="proc" ino=176405465 ioctlcmd=0xab20 scontext=u:r:untrusted_app:s0:c92,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c92,c257,c512,c768 tclass=file permissive=0
01-01 13:11:13.452 15282 15282 W i_hotkeyx_alpha: type=1400 audit(0.0:8087446): avc: denied { ioctl } for pid=15282 path="/proc/15282/rtg" dev="proc" ino=176405465 ioctlcmd=0xab20 scontext=u:r:untrusted_app:s0:c92,c257,c512,c768 tcontext=u:r:untrusted_app:s0:c92,c257,c512,c768 tclass=file permissive=0
01-01 13:11:13.555 15282 15282 I chatty  : uid=10348(com.tauri.uni_hotkeyx_alpha) identical 5 lines`



### Reproduction

_No response_

### Expected behavior

_No response_

### Full `tauri info` output

```text
pnpm tauri android dev
```


### Stack trace

_No response_

### Additional context

_No response_