以前使用$ cocos run -p android -ap 20 交叉编译是没问题的,真机也能运行,因为安卓运行中要报错,为了方便调试,想直接交叉编译到android studio,用android studio进行调试,可是要报错
$ cocos run -p android -ap 20 --android-studio
。。。。。
。。。。。
正在生成 apk 文件…
build.gradle 文件中 buildToolsVersion 的值为 20.0.0,但是文件夹 /Users/Konvie/cocos/AndroidDev/adt-bundle-mac-x86_64-20140702/sdk/build-tools/20.0.0 不存在。
正在执行:’"/Users/Konvie/cocos/AndroidDev/Projects/Sudoku-Nil-/proj.android-studio/gradlew" --parallel --info assembleDebug’
Starting Build
Settings evaluated using settings file ‘/Users/Konvie/cocos/AndroidDev/Projects/Sudoku-Nil-/proj.android-studio/settings.gradle’.
。。。。
。。。。。
FAILURE: Build failed with an exception.
- What went wrong:
A problem occurred configuring project ‘:Sudoku-Nil’.
A problem occurred configuring project ‘:libcocos2dx’.
failed to find target with hash string ‘android-22’ in: /Users/Konvie/cocos/AndroidDev/adt-bundle-mac-x86_64-20140702/sdk
- Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 5 mins 38.316 secs
Stopped 0 compiler daemon(s).
执行命令出错,返回值:1。
说build.gradle 文件中。。。。文件夹不存在是哪里配置不对么?为什么要报错“failed to find target with hash string ‘android-22’”?我是用的20啊