草庐IT

anko_version

全部标签

ios - flutter IOS : CocoaPods could not find compatible versions for pod "simple_permissions":

我是Flutter的新手,并在Flutter中开发Permission演示。我使用了simple_permission插件,这个插件在android中工作,但在ios中它给了我以下错误:CocoaPodscouldnotfindcompatibleversionsforpod"simple_permissions":Insnapshot(Podfile.lock):simple_permissions(from`.symlinks/plugins/simple_permissions/ios`)InPodfile:simple_permissions(from`.symlinks/pl

mongodb - mongorestore 时出错 - 发现断言 : 17370 Restoring users and roles is only supported for clusters with auth schema versions 1 or 3,:5

我正在尝试恢复使用mongodump创建的文件夹,并且我正在使用mongorestore。但是有一个错误:断言:17370恢复用户和角色仅支持具有身份验证架构版本1或3的集群,发现:5如何解决此错误并成功恢复? 最佳答案 我能够使用--db参数一次恢复单个数据库。 关于mongodb-mongorestore时出错-发现断言:17370Restoringusersandrolesisonlysupportedforclusterswithauthschemaversions1or3,:5

mongodb - mongorestore 时出错 - 发现断言 : 17370 Restoring users and roles is only supported for clusters with auth schema versions 1 or 3,:5

我正在尝试恢复使用mongodump创建的文件夹,并且我正在使用mongorestore。但是有一个错误:断言:17370恢复用户和角色仅支持具有身份验证架构版本1或3的集群,发现:5如何解决此错误并成功恢复? 最佳答案 我能够使用--db参数一次恢复单个数据库。 关于mongodb-mongorestore时出错-发现断言:17370Restoringusersandrolesisonlysupportedforclusterswithauthschemaversions1or3,:5

dart - flutter 错误 : The current Flutter SDK version is 2. 1.0-dev.0.0.flutter-be6309690f

我刚刚升级了我的flutter,升级后我无法在我的AndroidStudio上运行任何flutter项目。我收到此错误消息。ThecurrentDartSDKversionis2.1.0-dev.0.0.flutter-be6309690f.Becausebuddydependsonflutter_built_redux0.4.5whichrequiresSDKversion>=1.19.0如何降级Dart或如何解决此问题,我在mac上运行androidstudio。我已经尝试通过更改flutterchanneldev和master但它没有任何区别。flutter医生-v结果:[✓]F

ios - Flutter - SWIFT_VERSION 必须设置为支持的值

尝试库simple_permission,修复了pod错误,但出现了这个问题,不知道如何继续。BuildSettings里面没有设置swift版本,我试过加了,还是不行。Launchinglib/main.dartoniPhoneXindebugmode...Skippingcompilation.Fingerprintmatch.RunningXcodeclean...StartingXcodebuild...Xcodebuilddone.FailedtobuildiOSappErroroutputfromXcodebuild:↳**BUILDFAILED**Xcode'soutpu

kotlin - Anko 0.8 - Unresolved lparams 引用

主要问题是:lparams只是从Anko中消失了,还是我做错了什么?以下代码段无法编译:verticalLayout{}.lparams(width=matchParent,height=matchParent){topMargin=dip(10)}虽然这没有任何问题:verticalLayout{layoutParams=LinearLayout.LayoutParams(matchParent,matchParent).apply{topMargin=dip(10)}}我不太介意第二个选项,但是您必须在生成参数时指定布局类型,这可能会有点烦人(而且比原始解决方案更脆弱)。我没有在A

android - 如何用 kotlin 1.1.0 kotlinx-coroutines-core lib 的特性替换 Anko 的 doAsync、uiThread?

我有一些类似的代码:doAsync{...uiThread{...}}如何用kotlinx-coroutines-corelib中的新内容替换doAsync和uiThread? 最佳答案 协程库0.26版更新:UI已重命名为Main。0.26的完整工作示例:async(CommonPool){...withContext(Main){...}}您不需要从这里进一步阅读,我将把它留给对这个解决方案的发展感兴趣的人。协程库0.20版更新:run现在已弃用,您应该改用withContext。0.20的完整工作示例:async(Common

kotlin - 如何用 Anko 屏蔽密码?

我意识到Anko(和Kotlin)都非常先进,但我希望有人能够在这方面给我一些指导。当然,这对我来说只是一个学习项目。我从示例代码中得到了以下Kotlin代码(使用Anko),只做了非常小的修改:verticalLayout{padding=dip(30)valname=editText{hint="Name"textSize=24f}valpassword=editText{hint="Password"textSize=24finputType=android.text.InputType.TYPE_TEXT_VARIATION_PASSWORD}button("Login"){t

android - Anko 相当于 xml 中的样式 attr

我需要创建无边框按钮。xml中设置Widget.AppCompat.Button.Borderless的最简单方法。我正在尝试使用Ankobutton(theme=R.style.Widget_AppCompat_Button_Borderless_Colored,text="Send"){horizontalGravity=Gravity.ENDlparams(wrapContent,wrapContent)}但是没有效果。我做错了什么? 最佳答案 尝试使用第三个构造函数参数,它接受attr资源:addView(Button(ac

android - 是否可以在 Kotlin Anko 中重用布局

我读到使用Anko的最大好处是它的可重用性。但我找不到它的确切例子。目前在新的Android布局系统中,样板如下:DrawerLayout(withsomesetup)CoordinatorLayout(withsomesetup)AppBarLayout(withsomesetup)ToolBarNavigationView(withheaderinflated)从上面的布局结构来看,只有是变化的。和在许多情况下,这些仪式设置几乎在每项Activity中都重复。所以我在这里与Anko一起思考是否有关于该问题的可重用解决方案。我不希望它可重复用于通用布局,但至少我可以最小化项目中的仪式