草庐IT

member-initialization

全部标签

java - Android Studio Gradle 项目 "Unable to start the daemon process/initialization of VM"

AndroidStudio(Beta)0.8.4版本操作系统版本:Windows8JavaJRE/JDK版本:1.8.0_11Error:Unabletostartthedaemonprocess.Thisproblemmightbecausedbyincorrectconfigurationofthedaemon.Forexample,anunrecognizedjvmoptionisused.Pleaserefertotheuserguidechapteronthedaemonathttp://gradle.org/docs/1.12/userguide/gradle_daemon

java - Android Studio Gradle 项目 "Unable to start the daemon process/initialization of VM"

AndroidStudio(Beta)0.8.4版本操作系统版本:Windows8JavaJRE/JDK版本:1.8.0_11Error:Unabletostartthedaemonprocess.Thisproblemmightbecausedbyincorrectconfigurationofthedaemon.Forexample,anunrecognizedjvmoptionisused.Pleaserefertotheuserguidechapteronthedaemonathttp://gradle.org/docs/1.12/userguide/gradle_daemon

enums - swift : 'Rank? does not have a member named ' simpleDescription'?

我在下面的代码中不断收到错误:letrank1desc=rank1Conv.simpleDescription();letrank2desc=rank2Conv.simpleDescription();声称“等级?”没有名为“simpleDescription”的成员。我觉得这很奇怪,因为我根据Apple的教程编写了这段代码,并且没有像Rank一样在任何地方实现和可选?暗示我有。我很想知道为什么它会给我这个错误,如果确实存在的话,可选的是从哪里来的。非常感谢!这是我的代码:enumRank:Int{caseAce=1;caseTwo=2,Three=3,Four=4,Five=5,Si

arrays - 选择要附加到三元运算符 'if' 运算符 : "Immutable value... only has mutating members" 的数组

我有两个数组:varaddedToIgnoreList:[String]=[]varremovedFromIgnoreList:[String]=[]我想将一个值附加到这些数组之一。如果我这样做:(isUserIgnored?removedFromIgnoreList:addedToIgnoreList).append("username")我得到Immutablevalueoftype'[String]'onlyhasmutatingmembersnamed'append'如果我使用中间变量,它会起作用:varwhich=isUserIgnored?removedFromIgnore

ios - 'UITableViewCell ?' does not have a member named ' 文本标签'

我四处寻找这个问题的答案,但没有成功。我基本上是在按照教程创建一个简单的待办事项应用程序,许多其他人正在评论与下面相同的错误。作者暂时还没有解决办法。任何帮助,将不胜感激。我收到错误:'UITableViewCell?'没有名为“textLabel”的成员到目前为止,这是我的代码:importUIKitclassViewController:UIViewController,UITableViewDelegate,UITableViewDataSource{//tellsiphonewhattoputineachcellfunctableView(tableView:UITableVi

ios - 'required' initializer 'init(coder:)' 必须由 UIViewController 的子类提供

我知道还有其他类似的问题,但没有一个能回答我下面的问题。所以我有一个在XIB中定义了布局的ViewController。从另一个ViewController我想做这样的事情letdestVc=DestViewController(model:someModelData)self.showViewController(destVc,...)DestViewController定义如下:classDestViewController:UITableViewController{varmodel:SomeModelData{didSet{self.tableView.reloadData()

xcode - swift 错误 : Cannot find an initializer for type 'Double' that accepts an argument list of type '(String)'

我正在尝试从标记为“temperatureTextField”的文本字段中获取数据并将其分配给“t”,这是一个Double。理想情况下,用户应该向temperatureTextField添加一个数字值。这是我的方法:@IBOutletweakvartemperatureTextField:UITextField!@IBActionfuncconvert(sender:AnyObject){lett=Double(temperatureTextField.text!)lettempM=TemperatureModel(temp:t!)temperatureTextField.text=S

ios - "Ambiguous reference to member map"来自具体类型

这是我的代码。它使用来自CoreBluetooth的CBUUID。让我们假设v的转换是有效的。importUIKitimportCoreBluetoothfuncconvert(v:AnyObject)->[String:String]{return(vas![CBUUID:NSData]).map{(uuid,data)in(uuid.UUIDString,NSString(data:data,encoding:NSUTF8StringEncoding)??"")}}想法是通过为CBUUID调用CBUUID.UUIDString并通过调用适当的NSString构造函数来获取字典的字符

ios - 错误 : Type 'String!' has no member 'video'

importUIKitimportAVKitclassViewController:UIViewController{overridefuncviewDidLoad(){super.viewDidLoad()//startcameraletcaptureSession=AVCaptureSession()guardletcaptureDevice=AVCaptureDevice.default(for:.video)else{return}guardletinput=try?AVCaptureDeviceInput(device:captureDevice)else{return}ca

ios - 错误 : Instance member cannot be used on type 'ViewController'

这个问题在这里已经有了答案:Instancemembercannotbeusedontypeofcustomclass(3个答案)关闭4年前。我正在按照斯坦福类(class)的在线讲座制作浓度游戏,但我的代码的一部分出现错误。我收到错误消息“实例成员‘cardButtons’不能用于类型‘ViewController’”,但代码似乎适用于讲师。有人可以帮我解决这个问题吗?这是代码的一部分。第4行出现错误importUIKitclassViewController:UIViewController{@IBOutletvarcardButtons:[UIButton]!lazyvargam