1、react-native run-android时提示aapt权限被拒绝
完整LOG如下:
java.io.IOException: Cannot run program "/Users/name/AndroidSDKs/build-tools/23.0.2/aapt": error=13,Permission denied
解决办法:打开终端。进入SDK/build-tools/23.0.2目录下,执行命令
chmod a+x aapt
,会发现aapt图标变成exec(MAC环境下)
2、react-native run-android时提示zipalign优化的时候失败
完整LOG如下:
FAILURE: Build Failed with an exception.
* What went wrong: Execution Failed for task ':app:zipalignDebug'. > A problem occurred starting process 'command '/Users/name/AndroidSDKs/build-tools/23.0.2/zipalign''
解决办法与上面一样,虽然没有说明是权限问题,其实也是权限被拒绝了。
chmod a+x zipalign
持续更新