我在现有的xcode应用程序中安装了 cocoapods ,并在其中添加了 XLForm 。我正在使用 Xcode版本6.2 ,并且正在使用 objective-c 开发应用程序。然后,当我在安装依赖项后尝试运行项目时,它会在" XLFormSectionDescriptor.h" 文件中出现以下错误。
我该如何解决这个问题?有什么想法吗?
提前致谢。
答案 0 :(得分:1)
您应该更新到最新版本的Xcode,截至本文发布时为7.1.1。如果您有某些原因导致无法执行此操作(例如尚未准备好针对iOS 9 SDK进行编译),则必须删除该代码中的#define nonnull
属性。可能最简单的就是定义它。
import java.util.Scanner;
public class Qty_Of_Musicians_With_Details {
public static void main(String[] args) {
//Variables
String nameMember = "";
String lastName ="";
String instrument = "";
String member_LastName = "";
String member_Instrument = "";
String member_FirstName = "";
int qty_OfMember;
String musician_FirstName = "";
String musician_LastName = "";
String musician_Instrument = "" ;
//my scanner
Scanner userInput = new Scanner(System.in);
System.out.println("input number members");
//read and store user input
qty_OfMember = userInput.nextInt();
if(qty_OfMember<=8){
do{
//Using FOR LOOP
for(int i =1;i<=qtyOfMember;i++){
//ask for member Full Name
System.out.println("enter member# "+i+" full name");
//read and store firstname
member_FirstName= userInput.next();
musician_FirstName = member_FirstName ;
//read and store lastname
member_LastName = userInput.next();
musician_LastName=member_LastName;
//Ask for member instrument
System.out.println("member instrument");
//Read and store member instrument
member_Instrument=userInput.next();
musician_Instrument=member_Instrument;
//print out members names,last_names and instruments
System.out.println(i +"first_name: "+musician_First Name+"\n Last name: "+musician_LastName "\n instrument: "+ musician_Instrument s"\n" );
}
//here is the problem,donno how to stop it
//if user input qty Members == 3
// after asking each member details loop should stop
}while(??????????????????????????????????????????????????);
}
else{System.out.println("Sorry but studio can accept max 8 musicians");}
//System.out.println("name: "+ member1_Name +" Last_name: "+ member_Name" instrument: "+ member_Instrument);
//closing Scanner
userInput.close();
}
}
您可能应该使用检查编译器版本的#ifdef来包围它。比预处理器更熟悉的人必须提供那段代码。
错误是由于引入Xcode 6.x附带的旧版clang不理解的属性引起的。