Cocos2d-x android installation error - java.lang.NullPointerException

I am trying to configure cocos2d-x for Android and I was following the video tutorial

I passed steps for the terminal without any problems ( setup.py command result as expected).

My problem is that after I set NDK_ROOT in the C / C ++ Build - environment section, I get java.lang.NullPointerException exceptions.

For example, when I restart eclipse, I get the following error.

 An internal error occurred during: "Android Library Update". java.lang.NullPointerException 

When I try to re-open the C ++ C ++ environment section, I get the error message The currently displayed page contains invalid values. , and I can’t edit the environment values.

I checked the java build path, there is no JRE system library, and when I try to add, I get the same error

 An error has occurred. See error log for more details. java.lang.NullPointerException 

How can I fix the problem? Thank you for your help.

I'm working on

  • Mac OS 10.9.4
  • android-ndk-r9d
  • apache- ant -1.9.4
  • cocos2d-x-3.2
  • ADT-bundle-mac-x86_64-20140702
+5
source share
1 answer

I tried to fix this for a while, I would suggest comparing the .cproject file in your project with the one in templates/cpp-template-default and deleting additional sections in your file. I had to delete one section, I do not understand why it was added, but now it works.

Update: It seems this section is added after you open eclipse with NDK_ROOT but not defined, and after that, even if you define it, this section stays there in the configuration files and causes the same errors, you need to delete it so that make your project work.

The section looks like this: you can safely delete it after closing the 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> 
+17
source

Source: https://habr.com/ru/post/1200972/


All Articles