(已解決)Eclipsez中打不開c++文件,顯示Editor could not be initialized.


新建的游戲導入Eclipse能正常運行,配置什么的都弄好了,游戲運行無任何問題!
問題是:關閉Eclipse后,重新打開,就會出現
An internal error occurred during: "Android Library Update".
java.lang.NullPointerException


在Eclipse也打不開c++文件,顯示Editor could not be initialized. 
Details:
java.lang.NullPointerException
    at org.eclipse.cdt.internal.core.settings.model.CConfigurationDescriptionCache.loadData(CConfigurationDescriptionCache.java:104)
    at org.eclipse.cdt.internal.core.settings.model.CProjectDescription.loadDatas(CProjectDescription.java:196)


點project->properties->c/c++ Build也會出現
An error has occurred. See error log for more details.
java.lang.NullPointerException


但是第一次新建的項目導入運行正常,關閉再打開Eclipse問題又出現了


解決方式:
     在proj.android的同級目錄下,找到.cproject文件,打開后,找到如下的節點,刪除之,重新打開eclipse即可;
     <cconfiguration id="0.1230402123.1377291156">
            <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1230402123.1377291156" moduleId="org.eclipse.cdt.core.settings" name="Debug">
                <externalSettings/>
                <extensions>
                    <extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
                    <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
                    <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
                    <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
                    <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
                    <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
                </extensions>
            </storageModule>
            <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
     </cconfiguration>
(參考:http://stackoverflow.com/questions/25462415/cocos2d-x-android-set-up-error-java-lang-nullpointerexception)
=========================================
當時,還遇到了另外一個問題,自己新建了一個c++工程,從磁盤上刪除了工程引用的armeabi-v7a,結果打開eclipse時出現錯誤:
armeabi-v7a/devices.xml 發現了以元素‘d:skin’開頭的無效內容,此處不應包含子元素 ,,,,,
解決:
把自己下載的Android SDK目錄中對應版本的SDK中的devices.xml這個文件刪除,再把sdk里面tools\lib下的這個文件拷貝到你刪除的那個文件夾里,重啟eclipse;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM