If you have ever tried to run a Cocos2d-x app in an Android emulator, you might be familiar with this error: INSTALL_FAILED_NO_MATCHING_ABIS. This happens because your emulator is using one architecture while your app is compiled for a different architecture. Specifically, most people use x86 Android emulators, because they’re faster than their ARM counterparts. In Cocos2d-x 3.15.1, the default architecture is armeabi. Let’s explore how to fix this. The Fix We need to tell our project to compile for other architectures. In order to do so, we need to edit two files. First, head over to your application.mk . Open it up and find this line. APP_ABI := armeabi Change it to the following. APP_ABI := armeabi armeabi-v7a x86 Now find your gradle.properties , and locate the following line. PROP_APP_ABI=armeabi Add the other architectures, separated by colons, and we’re good to go! PROP_APP_ABI=armeabi:armeabi-v7a:x86 Time to Recompile Open up Terminal and navigate...
vi /etc/init.d/redis #!/bin/sh # chkconfig: 2345 10 90 # description: Start and Stop redis REDISPORT=6379 EXEC=/usr/redis/redis-3.2.4/src/redis-server CLIEXEC=/usr/redis/redis-3.2.4/src/redis-cli PIDFILE=/var/run/redis_${REDISPORT}.pid CONF="/usr/redis/redis-3.2.4/redis.conf" case "$1" in start) if [ -f $PIDFILE ] then echo "$PIDFILE exists, process is already running or crashed" else echo "Starting Redis server..." $EXEC $CONF & fi ;; stop) if [ ! -f $PIDFILE ] then echo "$PIDFILE does not exist, process is not running" else PID=$(cat $PIDFILE) echo "Stopping ..." $CLIEXEC -p $REDISPORT shutdown while [ -x /proc/${PID} ] do echo "Waiting for Redis to shutdown ..." ...
评论
发表评论