Cocos2d-x (Android)-those common error notes

Source: Internet
Author: User
Tags posix

Transferred from: http://blog.csdn.net/callchunli/article/details/8929813

(2013/9/2)
Build.xml:939:java.lang.arrayindexoutofboundsexcption:1 At com.android.ant.dependencygraph.parsedependencyfile<dependencygraph.java:180> At com.android.ant.dependencygraph.<init><dependencygraph.java:54> At com.android.ant.singledependencytask.initdependencies<singledependencytask.java:87> .....  Solution: do not think the code where there is a problem, and then re-create a new project, the code is copied all the past, re-ant debug survived successfully! 
(2012/8/30)--cygwin1, Using prebuilt externals
Cygwin Warning:
MS-DOS Style path Detected:d:\sdk\ndk/ndk-build
Preferred POSIX equivalent is:/cygdrive/d/sdk/ndk/ndk-build
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's Guide for more details about POSIX paths:
Http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Solve:
   2, D:/cocos2dx/cocos2dx/projects/hmd_td/proj.android/. /.. /.. /extensions/ccbreader/ccbreader.cpp:390:52:warning:multi-character character constant [-wmultichar]
compile++ thumb:cocos_extension_static <= CCControlButtonLoader.cpp
Solution:


3, Your Group is currently "MKPASSWD".  This indicates  , the/etc/passwd (and possibly/etc/group) files should be rebuilt. See the mans pages for MKPASSWD and Mkgroup so, for example, run  mkpasswd-l [-d] >/etc/passwd 
      Mkgroup-l [-d] >/etc/group  Note that the-d switch was necessary for domain users.  Bash:build_ajsc_emulator.sh:command not found cause: The original Windows system user name is not the same as the newly installed system user name resolved:  3.1. Follow the prompts to run $ mkpasswd-l >/etc/passwd$ mkgroup-l >/etc/group  Restart Cygwin.bat.  3.2. You can also directly modify the/etc/passwd, the user name of the site involved in the original system is updated to the current user name. 

(2013/8/28)--cygwin

1./build_native.sh Error: FIX: ndk_module_path Path specified error in environment configuration cocos2dx\platform\third_party\android\ prebuilt

2, Cygwin warning:MS-DOS style path Detected:c:\sdk\ndk/ndk-buildPreferred POSIX equivalent is:/cygdrive/c/sdk/ndk/ndk-buildCYGWIN environment variable option "nodosfilewarning" turns off this warning.Consult the user's Guide for more details about POSIX paths:Http://cygwin.com/cygwin-ug-net/using.html#using-pathnamesAndroid Ndk:error:/cygdrive/d/sdk/cocos2d/projects/huntersmustdie/proj.android/. /.. /.. /cocos2dx/platform/third_party/android/prebuilt/libjpeg/android.mk:cocos_jpeg_static:local_src_files points to a Missing fileAndroid Ndk:check That/cygdrive/d/sdk/cocos2d/projects/huntersmustdie/proj.android/. /.. /.. /COCOS2DX/PLATFORM/THIRD_PARTY/ANDROID/PREBUILT/LIBJPEG/LIBS/ARMEABI/LIBJPEG.A exists or that it path is correct Make : Enter directory "/cygdrive/d/sdk/cocos2d/projects/huntersmustdie/proj.android"/cygdrive/c/sdk/ndk/build/core/prebuilt-library.mk:45: * * * Android ndk:aborting. Stop it. Make : Leave the Directory "/cygdrive/d/sdk/cocos2d/projects/huntersmustdie/proj.android"Solution:without the cocos2d-x under the Platform/third_party ...

(2013/8/27)--cygwin
WARNING: App_platform android-9 is larger than Android:minsdkversion 8 in./androidmanifest.xml Resolution: The NDK specifies a version that is inconsistent with minsdkversion, finds the androidmanifest.xml in the Proj.android directory, modifies its minsdkversion value such as <uses-sdk android:minsdkversion= "9"/>

2. Error: ' Byte ' does not name a type resolve: program code BYTE type

(2013/8/17)--cocos2d-x-2.1.4

1, packaging. APK error:[Javac] C:\sdk\cocos2d\projects\helloworld\proj.android\gen\com\cocos2d-x\org\r.java:8: Error: Required ";"  [Javac] package com.cocos2d-x.org; Build FAILED: c:\sdk\sdk\tools\ant\build.xml:710:the following error occurred while executing This line : C:\sdk\sdk\tools\ant\build.xml:723:compile failed; see the compiler Error output For details. Solution:  Package name cocos2dx written  cocos2d-x

2, Sdk.dir is missing. Make sure to generate Local.properties using ' Android Update Project ' or to inject it through an env var  Solution 1: No Viable  Android Update Project--name  projectName - t 8-p  projectpath   locate project.properties files in android.library.reference.1=: /.. /.. /cocos2dx/platform/android/java it off # it doesn't work. Solution 2: It is feasible to add a local.properties file under the project, which specifies sdk.dir=c:\\sdk\ \SDK

3. Generate project Error with Python: C:\sdk\cocos2d\tools\project-creator>python CREATE_PROJECT.P y-project helloworld-package com.cocos2d-x.org-language cpp File "create_project.py", Line print "Usage:create_project.py-project project_name-package package_name -language programing_language "
^ 4, syntaxerror:invalid syntax
Solution: using the Python version is 2.7.3 and adding it to the system variable path:c:\python27; is the absolute path after the python you installed

5. Pack. APK error:c:\sdk\cocos2d\projects\helloworld\proj.android>ndk-build ndk_debug=1android NDK: Warning:i gnoring Unknown import directory:c:\sdk\cocos2dAndroid ndk:warning:i gnoring Unknown Import DIRECTORY:C:\SDK\COCOS2D\COCOS2DX\platform\third_party\android\prebuiltandroid Ndk:are you sure Your Ndk_module_path variable is properly defined? Android ndk:the following directories were searched: Android NDK:  jni/android.mk:23: * * * Android ndk:abborting.  . Stop. c:\sdk\cocos2d\projects\helloworld\proj.android> Solve

6, (Cygwin environment configuration)

6.1error:bash--c Invalid open cygwin.bat, @echo offc://Cygwin path chdir c:/cygwin/binbash --login-i resolved:  c://  Cygwin path
 
6.2 define Ndk_root FIX:  Locate the Cygwin installation directory. bash_profile file, add the next 2 sentences:ndk=/ CYGDRIVE/C/SDK/NDKexport NDK 
 

7. Package APK Error:

jni/. /.. /classes/appdelegate.h:4:21:fatal error:cocos2d.h:no such file or directorycompilation terminated.make: * * * [obj/local /ARMEABI/OBJS-DEBUG/COCOS2DCPP_SHARED/HELLOCPP/MAIN.O] Error1c:\sdk\cocos2d\projects\helloworld\proj.android > Solution: compiling so library with Cygwin

(2013/5/15)
1. Error opening trace file:no such file or directory each time a click on the menu button error opening trace file:no such file or directory reason 1:an       The version of the Droid API is inconsistent with the version of the emulator. 2: Resource file is missing (resource name, resource path, or not present at all)

2, Error: "XXX" does not name a type packaging the error of the APK times, the reason is: previously defined but not now the class file is not deleted

(2013/5/3)

1. Build Failed:android Unable to resolve target ' android-8 ' in package. APK when reported error: Build failed:android Unable to resolve target ' Android-8 '. This is because the version number of the original Project.Properties Project target is inconsistent with the AVD version number supported by your current Android environment, which resolves:   Open the project file Project.Properties, modify its target value, such as target=android-10//(corresponding version) If there is no project.properties, build one yourself. 

2. Error:cannot find ' make ' program. Please install Cygwin make package or define the Gnumake variable to the it.  FIX:Cygwin does not install the gun  make true machine Test direct "flash back"--------memory problems

(2013/6/17)

Drag bar TableView The cell display bug, every time to drag the display, that is, refresh the problem (overriding the OnEnter function, call refresh in the OnEnter function) Drag the bar TableView drag a few times the mess (override the OnEnter function, Instead of overriding the OnExit function) constructs () {}onenter () {}onexit () {} destructor () {}

(2013/8)

the Java or JAVAC command is not an internal or external command issue.  FIX:JDK Environment configures user variable classpath variable value:.; %java_home%\lib; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar  java_home Variable Value:C:\Program Files \java\jdk1.7.0 (location of installed JDK) 

System Variables  Path:%java_home%\bin;%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;%systemroot %\system32\windowspowershell\v1.0\; C:\SDK\NDK; C:\sdk\sdk\tools; C:\sdk\sdk\platform-tools; C:\sdk\ant\bin; C:\Program Files\Microsoft SQL Server\100\tools\binn\; C:\Program Files \java\jdk1.7.0
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.