草庐IT

deprecation

全部标签

flutter - 注意 : “Cloud Firestore Overrides a deprecated API”

在为Android(安装APK)编译我的Flutter移动应用程序时,我收到以下警告:registerResGeneratingTaskisdeprecated,useregisterGeneratedResFolders(FileCollection)registerResGeneratingTaskisdeprecated,useregisterGeneratedResFolders(FileCollection)registerResGeneratingTaskisdeprecated,useregisterGeneratedResFolders(FileCollection)r

swift - 绑定(bind) ObservableObject 数组的元素 : 'subscript(_:)' is deprecated

我正在使用一个ObservableObject“DataStore”,它包含对象(“exampleObject”)的数组(“exampleList”)。@PublishedexampleList=[exampleObject]()我正在通过@EnvironmentObject('dataStore')调用数据存储。@EnvironmentObjectvardataStore=DataStore()然后我用迭代列表ForEach(0..要将项目的元素绑定(bind)到详细信息View,我这样做:DetailView(itemBinding:$dataStore.exampleList[i

swift - '子字符串(到 : )' is deprecated: Please use String slicing subscript with a ' partial range upto' operator

如何将以下代码更新到新版本的swift:self.areaCodeLael.text!=localNumber.substring(to:localNumber.index(localNumber.startIndex,offsetBy:3))我试过关注这篇文章,但我做对了HowcanIuseStringslicingsubscriptsinSwift4?我将我的原始代码调整为localNumber[..但我得到:Cannotsubscriptavalueoftype'String'withanindexoftype'PartialRangeUpTo' 最佳

ios - MPMediaItemArtwork 初始化(图像 :) deprecated in iOS 10. 0

Apple在iOS10中弃用了MPMediaItemArtwork中的init(image:)方法。什么是新的替代品。类显示接口(interface)显示下面的方法在新的操作系统版本中可用publicinit(boundsSize:CGSize,requestHandler:@escaping(CGSize)->UIImage)有人知道怎么用吗?还有问题2,上一个问题的一部分:使用MPNowPlayingInfoCenter在锁屏和控制中心显示正在播放元数据是否在模拟器中有效? 最佳答案 您可以使用以下代码:letimage=UII

swift - FBSDKApplicationDelegate 申请openURL :sourceApplication:annotation deprecated

不推荐使用iOS9应用程序openURL:sourceApplication:annotationfuncapplication(application:UIApplication,openURLurl:NSURL,sourceApplication:String?,annotation:AnyObject?)->Bool{returnFBSDKApplicationDelegate.sharedInstance().application(application,openURL:url,sourceApplication:sourceApplication,annotation:an

swift - 修复 Swift 3 中的警告 "C-style for Statement is deprecated"

我已将Xcode更新到7.3,现在我对用于创建随机字符串的函数发出警告。我试图用for更改for(iin0..语句,但是警告变成了错误。如何删除警告?staticfuncrandomStringWithLength(len:Int)->NSString{letletters:NSString="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"letrandomString:NSMutableString=NSMutableString(capacity:len)for(vari=0;i

ios - setStatusBarHidden(_ :withAnimation:) deprecated in iOS 9

我看到在iOS9中,setStatusBarHidden(_:withAnimation:)现在已被弃用,文档说使用[UIViewControllerprefersStatusBarHidden]代替,但是替代方法是什么iOS9如果我还想用幻灯片动画隐藏状态栏? 最佳答案 引用preferredStatusBarUpdateAnimation,动图代码classViewController:UIViewController{varisHidden:Bool=false{didSet{UIView.animate(withDurati

git - heroku 命令和推送给我 'CLI is deprecated. Please reinstall' 错误

我推送到heroku没有问题,但现在每当我写一个命令时:herokucreateherokuopengitpushherokumaster它给了我这个错误:$herokuopen▸heroku-cli:ThisCLIisdeprecated.Pleasereinstallfrom▸https://cli.heroku.com我应该怎么做才能阻止这种情况?我已经为以前没有给我任何问题的网站运行heroku,但现在显示错误。我使用的是相同的设备,身份验证细节没有改变。我还重新启动了计算机(这是一台mac)。 最佳答案 使用自制软件升级您

php - PHP 中的 "Function split() is deprecated"?

$stringText="[TEST-1]testtask1Created:06/Apr/11Updated:06/Apr/11";$splitArray=split("",$stringText);Deprecated:Functionsplit()isdeprecatedinC:\wamp\www\RSS.phponline27为什么会出现这个错误? 最佳答案 http://php.net/manual/en/function.split.php来自手册WarningThisfunctionhasbeenDEPRECATEDas

php - 在 php 错误日志中禁用 E_DEPRECATED

我有一台运行商业软件的生产服务器,该软件使用了已弃用的功能。我们已经在php.ini中禁用了错误输出——display_errors=Off——因此用户不会看到这些错误。但是,我们仍在记录PHP错误——log_errors=On——以便追踪问题。问题:对于最终传递给错误日志的内容,PHP似乎忽略了error_reporting指令。无论输入什么值组合,文件记录都会发生,就像我设置为E_ALL一样。因此,我的错误日志中充斥着弃用通知。在php.ini中设置了默认时区值,因此与时区相关的问题不相关。软件包的升级尚不可用,因此请不要建议“仅修复已弃用的代码”。我正在专门寻找方法来防止PHP在