在导入cocos2d项目之后,eclipse引发了两个奇怪的错误:"Android Library Update","C/C++ Indexer"

Nya*_*Nya 2 eclipse android cocos2d-x

将cocos2d项目导入eclipse后,会引发两个奇怪的错误:

"Android库更新","C/C++索引器"

错误:

   An internal error occured during :"C/C++" . java.lang.NullPointerException.               
    An internal error occured during :"Android Library Update" . java.lang.NullPointerException.
Run Code Online (Sandbox Code Playgroud)

提前致谢.

Dia*_*ami 8

请参阅我的回答/sf/answers/1812495121/

我一直试图解决这个问题,我建议将.cproject项目中的文件与文件中的文件进行比较templates/cpp-template-default并删除文件中的额外部分.我不得不删除一个部分,我不知道为什么它被添加但它现在有效.

更新:看来这部分是在你没有定义NDK_ROOT的情况下打开eclipse时添加的,之后,即使你定义它,这部分也会保留在配置文件中并导致相同的错误,你需要删除它以获得你的项目上班.

该部分看起来像这样,你可以在关闭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>
Run Code Online (Sandbox Code Playgroud)