1.查看环境(核查路径和对应的2dx版本) 终端: open .bash_profile export PATH=${PATH}:/Users/admin/Documents/work/android/android-sdk-macosx/tools export COCOS2DX_ROOT=/Users/admin/Documents/work/android/cocos2d-2.1rc0-x-2.1.2 export ANDROID_S
1.查看环境(核查路径和对应的2dx版本)
终端:open .bash_profile
export PATH=${PATH}:/Users/admin/Documents/work/android/android-sdk-macosx/tools
export COCOS2DX_ROOT=/Users/admin/Documents/work/android/cocos2d-2.1rc0-x-2.1.2
export ANDROID_SDK_ROOT=/Users/admin/Documents/work/android/android-sdk-macosx
export ANDROID_NDK_ROOT=/Users/admin/Documents/work/android/android-ndk-r8d
export NDK_ROOT=/Users/admin/Documents/work/android/android-ndk-r8d
export PATH=$PATH:$ANDROID_NDK_ROOT
export PATH=$PATH:$ANDROID_SDK_ROOT
2.创建android 2dx项目
(1)cd 2dx目录
(2)./create-android-project.sh 创建项目
(3)输入包名
(4)选android版本
(5)输入项目名
3.android的2dx项目引进eclipse并转换成C++
(1)把新创建的项目proj.android引进eclipse
ERROR:项目名.java文件出错
删除原有的:org.cocos2dx包,建立org.cocos2dx.lib包
这个目录下的.java文件拷贝到新建的包(org.cocos2dx.lib包)下
/Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0/cocos2dx/platform/android/java/src/org/cocos2dx/lib
(2)转换成c++(选择Makefile project、MacOSX GCC)
ERROR:
DescriptionResourcePathLocationType 错误提示
Program "g++" not found in PATHPreferences, C++/Build/Settings/Discovery, [CDT GCC Built-in Compiler Settings] optionsC/C++ Scanner Discovery Problem
可能是不识别gcc, g++命令通过xcode安装这两个终端命令
(3)右键项目选择Properties
4.配置eclipse环境
右键项目选择Properties
(1)C/C++ Build:Build command:
…(路径)/build_native.sh(项目的那个文件)
(2)Environment: 右边的add:
name: NDK_ROOT
value:/Users/admin/Documents/work/android/android-ndk-r8d
(3)C/C++ General: Paths and Symbols: includes: GUN C++ :add
/Users/admin/Documents/work/android/android-ndk-r8d/platforms/android-8/arch-arm/usr/include
/Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0/CocosDenshion/include
/Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0/extensions //extensions用到这里边的类了
(4)C/C++ General: Paths and Symbols: Output Location:
项目的Classes目录
/Users/admin/Documents/work/android/cocos2d-2.1rc0-x-2.1.2/cocos2dx 目录
/Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0/extensions //extensions用到这里边的类了
5.android 2dx项目移到 .../cocos2d-2.1rc0-x-2.1.2文件夹外
(1)修改build_native.sh
COCOS2DX_ROOT="/Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0"
APP_ROOT="/Users/admin/Desktop/today/AAA"
APP_ANDROID_ROOT="/Users/admin/Desktop/today/AAA/proj.android"
NDK_ROOT="/Users/admin/Documents/work/android/android-ndk-r8d" //有的不需要修改
(2)改变4 (1)的文件路径 /Users/admin/Desktop/today/AAA/proj.android/build_native.sh
ERROR: 如果你已经编译过2dx项目了/Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0/WU/proj.android/obj
把obj目录删除,obj目录是编译c++后生成的。
6.不在终端编译 .../build_native.sh
bash ${workspace_loc:/ATest}/build_native.sh NDK_DEBUG=1 V=1
在# options后加 NDK_ROOT=/Users/admin/Documents/android/android-ndk-r8d
7.从其他地方引进2dx android项目
(1)按照 4 从新搭建环境
(2)按照 5 修改 build_native.sh文件
(3)修改文件(build_native.sh)权限
Error: Permission denied
chmod -R 777 文件路径
ERROR: 如果你已经编译过2dx项目了/Users/admin/Documents/work/android/cocos2d-2.1beta3-x-2.1.0/WU/proj.android/obj
把obj目录删除,obj目录是编译c++后生成的。

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

MySQloffersechar, Varchar, text, Anddenumforstringdata.usecharforfixed-Lengthstrings, VarcharerForvariable-Length, text forlarger text, AndenumforenforcingdataAntegritywithaetofvalues.

Optimizing MySQLBLOB requests can be done through the following strategies: 1. Reduce the frequency of BLOB query, use independent requests or delay loading; 2. Select the appropriate BLOB type (such as TINYBLOB); 3. Separate the BLOB data into separate tables; 4. Compress the BLOB data at the application layer; 5. Index the BLOB metadata. These methods can effectively improve performance by combining monitoring, caching and data sharding in actual applications.

Mastering the method of adding MySQL users is crucial for database administrators and developers because it ensures the security and access control of the database. 1) Create a new user using the CREATEUSER command, 2) Assign permissions through the GRANT command, 3) Use FLUSHPRIVILEGES to ensure permissions take effect, 4) Regularly audit and clean user accounts to maintain performance and security.

ChooseCHARforfixed-lengthdata,VARCHARforvariable-lengthdata,andTEXTforlargetextfields.1)CHARisefficientforconsistent-lengthdatalikecodes.2)VARCHARsuitsvariable-lengthdatalikenames,balancingflexibilityandperformance.3)TEXTisidealforlargetextslikeartic

Best practices for handling string data types and indexes in MySQL include: 1) Selecting the appropriate string type, such as CHAR for fixed length, VARCHAR for variable length, and TEXT for large text; 2) Be cautious in indexing, avoid over-indexing, and create indexes for common queries; 3) Use prefix indexes and full-text indexes to optimize long string searches; 4) Regularly monitor and optimize indexes to keep indexes small and efficient. Through these methods, we can balance read and write performance and improve database efficiency.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

WebStorm Mac version
Useful JavaScript development tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
