Wednesday, September 14, 2011

unable to access file: corrupted zip file


話說最近在Build Android Project有遇到一個問題

packages/apps/Calculator/src/com/android/calculator2/HistoryAdapter.java:65: cannot access org.xmlpull.v1.XmlPullParser bad class file: org/xmlpull/v1/XmlPullParser.class(org/xmlpull/v1:XmlPullParser.class) unable to access file: corrupted zip file Please remove or make sure it appears in the correct subdirectory of the classpath. view = mInflater.inflate(R.layout.history_item, parent, false); ^
論壇上人說


如果你是使用apt-get install 来安装eclipse的话  
使用apt-get remove  eclipse

但是實際上應該要做的是設定一些路徑,可以修改 .bashrc 加上這些
                                                   

export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.13 export CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib:./ export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin


當然JAVA_HOME 是要自己去找一下的


--



另外最近還有遇到一個妙問題


java -version


java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.1) (6b22-1.10.1-0ubuntu1)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)


OpenJDK在Build Android 2.3.5以上的時候有點問題 QQ


所以就移除重裝


sudo apt-get remove openjdk-6-jdk
sudo apt-get remove openjdk-6-jre
sudo apt-get remove icedtea-6-jre-cacao


sudo apt-get install sun-java6-jdk
sudo apt-get autoremove


檢查一下


java -version


java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)


就ok了



Eclipse 相關文章:

set Android error log on Eclipse

linux(ubuntu)環境下開發 Android 所遇到的Eclipse 設定問題

Android tutorial : Before HelloWorld

No comments:

Post a Comment

發表一下意見,互動一下唄!

LinkWithin

Related Posts Plugin for WordPress, Blogger...

Adventure Book 2.0 Headline Animator

GoogleAd

funP Android 相關文章