草庐IT

must_raise

全部标签

ios - 错误 : UICollectionView must be initialized with a non-nil layout parameter

我正在尝试从youtube教程创建一个类似FacebookMessenger的应用程序。我有一个主页,用户可以在其中单击BarButton打开聊天。主页工作正常,直到我单击BarButton打开聊天,它崩溃并显示以下错误消息“必须使用非零布局参数初始化UICollectionView”。我是iOS开发的新手,所以无法真正理解问题出在哪里,因为我已经有了init方法。由于我有不同的观点,我是否在AppDelegate中遗漏了什么,这令人困惑:(。非常感谢您的帮助。谢谢!classChatViewController:UICollectionViewController,UICollect

ios - 为什么在注册子类时出现错误 "the class ... must be registered with registerSubclass before using Parse"?

从iOSparse-library-1.6.3升级到parse-library1.7.5后,我在我的一个PFQueryTableViewController的queryForTable中收到以下错误:Terminatingappduetouncaughtexception'NSInternalInconsistencyException',reason:'TheclassAppname.AttendingModelmustberegisteredwithregisterSubclassbeforeusingParse.'但是,我在application:didFinishLaunchi

swift - SWReveal - CoreAnimation 警告 : stiffness/damping must be greater than 0

在单独项目中运行测试后,我已将SWReveal集成到我的应用中。我从here下载了SWReveal(最新=v2.4)并按照AppCoda上的教程进行操作.在独立项目中我没有遇到任何问题。但是在我的应用程序中(仍然作为一组独立的ViewController/表运行,我收到了这两个警告:CoreAnimation:stiffnessmustbegreaterthan0.CoreAnimation:dampingmustbegreaterthanorequalto0.如果我禁用滚动的所有方面或启用所有方面,警告就会消失。这与我从AppCoda获得的示例项目不同(我在控制台没有警告输出)。虽然

ios - UICollectionView 错误 : cells must be retrieved by calling -: -dequeueReusableCellWithReuseIdentifier:forIndexPath:

在我的项目中,我有多种类型的UITableview单元格,每个单元格都包含UICollectionview。最初我在UITableview的2个部分加载了2个tableViewcell。起初它加载正常没有任何问题。如果我滚动第一部分,它会很好地滚动,但是当我尝试滚动第二部分时,它会出现以下错误:thecellreturnedfrom-collectionView:cellForItemAtIndexPath:doesnothaveareuseIdentifier-cellsmustberetrievedbycalling-dequeueReusableCellWithReuseIden

ios - 我在 Swift 中不断收到此错误。 "Consecutive Declarations On A Line Must Be Separated By ' ;'"

这是我的代码,非常感谢任何帮助,谢谢!这是在Swift中用Xcode编写的。我不断收到这样的错误:“一行中的连续声明必须用‘;’分隔”importUIKitclassViewController:UIViewController{@IBOutletvaroutputLabel:UILabel!=UILabel()varcurrentCount:Int=0overridefuncviewDidLoad(){super.viewDidLoad()//Doanyadditionalsetupafterloadingtheview,typicallyfromanib.}overridefunc

Xcode 7.1 : Property with retain or strong attribute must be of object type

我在一个swift文件中有这个变量:varadbk:ABAddressBook!一直很好,直到Xcode7.1。现在它提示“具有保留或强属性的属性必须是对象类型。”错误在-Swift.h文件中。知道发生了什么变化会导致这种情况以及如何解决它吗? 最佳答案 如果Swift类声明了一些AdressBook属性并且此类是混合Swift/ObjC项目的一部分,则会发生此错误。Xcode然后生成Swift桥接header,其中此属性变为(nonatomic,strong),它仅适用于对象,不适用于结构。当我需要将ABRecordRef从Obj

GET 方法的 java.lang.IllegalArgumentException : baseUrl must end in/while using retrofit 2. 1.0

我正在使用Retrofit2进行API解析。在使用retrofit1.9.0时,post和get方法都可以正常工作。但是使用retrofit2.1.0,在get方法中,出现错误:java.lang.IllegalArgumentException:baseUrlmustendin/我已经检查了我的代码,没有问题,它正在为post方法工作。Retrofitretrofit=newRetrofit.Builder().baseUrl("sample.com/ecomtest/index.php?route=api/").addConverterFactory(GsonConverterFa

java - 更新到 ChromeDriver 2.46 后 Chrome version must be between 71 and 75 错误

将chromedriver更新到2.46版后,我的口味无法初始化。我收到这样的消息:StartingChromeDriver2.46.628402(536cd7adbad73a3783fdc2cab92ab2ba7ec361e1)onport44269Onlylocalconnectionsareallowed.PleaseprotectportsusedbyChromeDriverandrelatedtestframeworkstopreventaccessbymaliciouscode.Failedtoinvokeconfigurationmethodcom.personal.Cu

java - 房间持久性 : Entities and POJOs must have a usable constructor

我正在尝试通过RoomPersistence库将数据库添加到我的Android应用程序。在编译时出现上述错误。此外,Room找不到我的getter,尽管我可以在我的代码中清楚地看到它们。这是我的实体代码:@Entity(tableName="users",indices=@Index(value="username",unique=true))publicclassUser{@NonNullpublicStringgetuId(){returnuId;}publicvoidsetuId(@NonNullStringuId){this.uId=uId;}publicStringgetuU

java - "@annotations must be on separate line"的 Checkstyle 规则

我正在尝试为checkstyle创建一个规则,它将阻止编写内联注释用法,如下所示:@EntityMyClasssomeEntity;@Foo(a="B")publicvoidbar(Bazbaz){}但不会阻止这样的想法:publicvoidbar(@ParamBazbaz){}有什么办法可以实现吗? 最佳答案 这个答案的大部分灵感来自Checkstyle's"WritingChecks"article.大部分工作在AnnotationSameLineCheck中完成。AnnotationSameLineCheck.java此Jav