Flutter - 键盘未显示在 Android 12 设备中

Sha*_*ngh 9 keyboard android flutter

对于 Android 12 设备,键盘未显示,覆盖层显示键盘已打开,但未显示任何内容。它适用于较旧的 Android 版本。

\n

键盘在其他应用程序中工作正常,并且在具有 Android 12 以外的 Android 版本的模拟器上也能正常工作。在物理设备上尝试过,Android 12 的 Pixel 也面临同样的问题。

\n

扑动医生代码-

\n
flutter doctor -v\n[\xe2\x9c\x93] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale en-IN)\n    \xe2\x80\xa2 Flutter version 2.2.3 at /Users/uable/Downloads/flutter\n    \xe2\x80\xa2 Framework revision f4abaa0735 (4 months ago), 2021-07-01 12:46:11 -0700\n    \xe2\x80\xa2 Engine revision 241c87ad80\n    \xe2\x80\xa2 Dart version 2.13.4\n\n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 31.0.0)\n    \xe2\x80\xa2 Android SDK at /Users/uable/Library/Android/sdk\n    \xe2\x80\xa2 Platform android-31, build-tools 31.0.0\n    \xe2\x80\xa2 ANDROID_HOME = /Users/uable/Library/Android/sdk\n    \xe2\x80\xa2 ANDROID_SDK_ROOT = /Users/uable/Library/Android/sdk\n    \xe2\x80\xa2 Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java\n    \xe2\x80\xa2 Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)\n    \xe2\x80\xa2 All Android licenses accepted.\n\n[!] Xcode - develop for iOS and macOS\n    \xe2\x9c\x97 Xcode installation is incomplete; a full installation is necessary for iOS development.\n      Download at: https://developer.apple.com/xcode/download/\n      Or install Xcode via the App Store.\n      Once installed, run:\n        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer\n        sudo xcodebuild -runFirstLaunch\n    \xe2\x80\xa2 CocoaPods version 1.10.2\n\n[\xe2\x9c\x93] Chrome - develop for the web\n    \xe2\x80\xa2 Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome\n\n[\xe2\x9c\x93] Android Studio (version 4.1)\n    \xe2\x80\xa2 Android Studio at /Applications/Android Studio.app/Contents\n    \xe2\x80\xa2 Flutter plugin can be installed from:\n       https://plugins.jetbrains.com/plugin/9212-flutter\n    \xe2\x80\xa2 Dart plugin can be installed from:\n       https://plugins.jetbrains.com/plugin/6351-dart\n    \xe2\x80\xa2 Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)\n\n[\xe2\x9c\x93] Connected device (2 available)\n    \xe2\x80\xa2 sdk gphone64 x86 64 (mobile) \xe2\x80\xa2 emulator-5554 \xe2\x80\xa2 android-x64    \xe2\x80\xa2 Android 12 (API 31) (emulator)\n    \xe2\x80\xa2 Chrome (web)                 \xe2\x80\xa2 chrome        \xe2\x80\xa2 web-javascript \xe2\x80\xa2 Google Chrome 95.0.4638.54\n\n! Doctor found issues in 1 category.\n
Run Code Online (Sandbox Code Playgroud)\n

下面是带有键盘的简单文本字段的图像,也尝试更改文本字段的所有属性。它是一个现有的应用程序,因此尝试测试现有的文本字段,即使在那些显示相同行为的文本字段中也是如此。

\n

Android 等级设置

\n
    minSdkVersion 24\n    targetSdkVersion 30\n
Run Code Online (Sandbox Code Playgroud)\n

在此输入图像描述

\n

小智 0

在此输入图像描述 我认为这个错误是因为这个模拟器与系统UI错误,你可以擦除模拟器的数据然后再次运行