The import org.cocos2dx.lib cannot be resolved

Step 1: In Eclipse, right-click on your project and select the last option "properties". 
Step 2: In Project Properties window, select "Java Build Path" in the left pane. 
Step 3: Under Java Build Path, select tab "source". It should be selected by default.
Step 4: Click on button "Link Source" 
Step 5: Browse it to following location-> COCOS2D-X_INSTALLATION_FOLDER/cocos2dx/platform/android/java/src

In step 5, replace COCOS2D-X_INSTALLATION_FOLDER with your cocos2d-x directory

Step 6: Give any folder name. For example, I gave: Cocos2d-x-source
Step 7: Click Ok.

猜你喜欢

转载自song020cn.iteye.com/blog/1876623