Android编译apk cannot find symbol


1、没有 import

2、 http://blog.csdn.net/wangwei890702/article/details/11547679

   Android.mk中删掉 LOCAL_SDK_VERSION := current

    最后在网上查找到由于我的   Android.mk   文件使用了    LOCAL_SDK_VERSION := current

     


阅读更多

编译出错:cannot find symbol

11-10

[b]这是一个作业,没有提供main,代码是粘帖到网站上,在服务器上编译然后给出结果,所以我这里只有需要我提交的那一小段代码。[/b]rnrnrn import java.util.ArrayList;rn 2: rn 3: class StudentSubmission rn 4: RCB handleRequestCompletion_FCFS(ArrayList requestQueue) rn 5: if (requestQueue.isEmpty())rn 6: rn 7: return null;rn 8: rn 9: rn10: long temp = 0;rn11: int index = 0;rn12: RCB tempRequest = new RCB();rn13: temp = requestQueue.get(0).arrivalTimeStamp;rn14: for(int i = 0; i < requestQueue.size(); i++)rn15: rn16: if ( temp > requestQueue.get(i).arrivalTimeStamp )rn17: rn18: temp = requestQueue.get(i).arrivalTimeStamp;rn19: index = i;rn20: tempRequest = requestQueue.get(i);rn21: rn22: rn23: rn24: requestQueue.remove(index);rn25: return tempRequest;rn26: rn27: rnrnrnRCB class的定义:rn public class RCB rn public int requestID;rn public long arrivalTimeStamp;rn public long cylinder;rn public String address;rn public int processID;rn rn RCB(int requestID, long arrivalTimeStamp, long cylinder, String address, int processID)rn rn this.requestID = requestID;rn this.arrivalTimeStamp = arrivalTimeStamp;rn this.cylinder = cylinder;rn this.address = address;rn this.processID = processID;rn rnrn public RCB() rn // TODO Auto-generated constructor stubrn rn rn rnrnrn[b]编译之后的error code:[/b]rnstudentSubmission.java:13: cannot find symbolrnsymbol : variable arrivalTimeStamprnlocation: class java.lang.Objectrn temp = requestQueue.get(0).arrivalTimeStamp;rn ^rnstudentSubmission.java:16: cannot find symbolrnsymbol : variable arrivalTimeStamprnlocation: class java.lang.Objectrn if ( temp > requestQueue.get(i).arrivalTimeStamp )rn ^rnstudentSubmission.java:18: cannot find symbolrnsymbol : variable arrivalTimeStamprnlocation: class java.lang.Objectrn temp = requestQueue.get(i).arrivalTimeStamp;rn ^rnstudentSubmission.java:20: incompatible typesrnfound : java.lang.Objectrnrequired: RCBrn tempRequest = requestQueue.get(i);rn ^rnNote: test.java uses unchecked or unsafe operations.rnNote: Recompile with -Xlint:unchecked for details.rn4 errorsrnrnrnrn[b]复制过来格式很乱,但是错误都是在requestQueue这个ArrayList上面。rn谢谢[/b]

没有更多推荐了,返回首页