Im-Kevin / cool_ui

用flutter实现一些我认为好看的UI控件,有Popover,仿Weui的Toast,自定义键盘
Apache License 2.0
460 stars 74 forks source link

androidx 使用cool_ui遇到的问题 #38

Closed chenjuyu closed 4 years ago

chenjuyu commented 4 years ago

[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, No such TextInputType: CKNumberKeyboard, null) 使用example中的CustomKeyboardDemo dart文件 焦点到输入框,提示如上错误,弹出键盘没有控制到只显示数字, 环境:D:\my_app\my_app>flutter doctor -v [√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.17763.864], locale zh-CN) • Flutter version 1.12.13+hotfix.5 at D:\flutter • Framework revision 27321ebbad (6 weeks ago), 2019-12-10 18:15:01 -0800 • Engine revision 2994f7e1e6 • Dart version 2.7.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at D:\AndroidSDK • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.2 • ANDROID_HOME = D:\AndroidSDK • Java binary at: D:\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03) • All Android licenses accepted.

[√] Android Studio (version 3.5) • Android Studio at D:\Android Studio • Flutter plugin version 41.0.2 • Dart plugin version 191.8593 • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[!] IntelliJ IDEA Ultimate Edition (version 2019.3) • IntelliJ at D:\IDEA20193 X Flutter plugin not installed; this adds Flutter specific functionality. X Dart plugin not installed; this adds Dart specific functionality. • For information about installing plugins, see https://flutter.dev/intellij-setup/#installing-the-plugins

[√] Connected device (1 available) • MOGOLIA • F2C7N15429014716 • android-arm • Android 6.0 (API 23)

! Doctor found issues in 1 category.

Im-Kevin commented 4 years ago

你用的是哪个版本

chenjuyu commented 4 years ago

3.1与4.1都试过了,都出现这个问题,没见弹出数字键盘

------------------ 原始邮件 ------------------ 发件人: "notifications"<notifications@github.com>; 发送时间: 2020年2月6日(星期四) 晚上6:57 收件人: "Im-Kevin/cool_ui"<cool_ui@noreply.github.com>; 抄送: "CHEN"<2498525982@qq.com>; "Author"<author@noreply.github.com>; 主题: Re: [Im-Kevin/cool_ui] androidx 使用cool_ui遇到的问题 (#38)

你用的是哪个版本

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Im-Kevin commented 4 years ago

你是直接运行Demo吗,还是有所改动

Im-Kevin commented 4 years ago

如果只是把CustomKeyboardDemo 搬过去,则需要把这几步做一下 image

Im-Kevin commented 4 years ago

具体你可以看这个自定义键盘使用方法快速入门

chenjuyu commented 4 years ago

具体你可以看这个自定义键盘使用方法快速入门

谢谢,可以了,但是使用你自带的demo,输入框,来回切换还是会把这个错误 Unhandled Exception: PlatformException(error, No such TextInputType: CKTestKeyboard, null) 先切到输入数字键盘的,然后焦点放到多键盘的文本框,再切回数字键盘还是会报这个为null

Im-Kevin commented 4 years ago

好的,我修正一下Demo

chenjuyu commented 4 years ago

好的,我修正一下Demo 还有一个问题,就是下载其他github上的库存 时,重新flutter pub get 就会报如下错误,然后我是先把依赖版本改为0.3.1后重新get,然后又改为0.4.1 后 get 才正常,大佬有遇到过吗? Because no versions of cool_ui match 0.4.1 and no versions of cool_ui match >0.4.1 <0.5.0, cool_ui ^0.4.1 is forbidden. So, because my_app depends on cool_ui ^0.4.1, version solving failed.

Im-Kevin commented 4 years ago

你可以试着删掉pubspec.lock再重新执行看看,这个可能是镜像的一些Bug