Cocos2d-x Plugin-X publish Build Error

 Cocos2d-x-3.0alpha1에 있는 플러그인 시스템을 빌드하는 중 아래와 같은 에러가 발생했습니다.

---------------------------------

Now publish umeng
---------------------------------
target dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/publish/plugins/umeng
android project dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/umeng/proj
.android

Publish plugin for android
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/umeng/proj.android /cygdrive/d/co
cos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools

BUILD SUCCESSFUL
Total time: 0 seconds

BUILD FAILED
d:\android\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:542: Unable to resolve project target 'android-7'

Total time: 0 seconds
cp: cannot stat `/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/umeng/proj.andro
id/bin/*.jar': No such file or directory
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plu
gin/tools
---------------------------------

Now publish alipay
---------------------------------
target dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/publish/plugins/alipay
android project dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/alipay/pro
j.android

Publish plugin for android
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/alipay/proj.android /cygdrive/d/c
ocos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools

BUILD SUCCESSFUL
Total time: 0 seconds

BUILD FAILED
d:\android\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:542: Unable to resolve project target 'android-7'

Total time: 0 seconds
cp: cannot stat `/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/alipay/proj.andr
oid/bin/*.jar': No such file or directory
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plu
gin/tools
---------------------------------

Now publish nd91
---------------------------------
target dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/publish/plugins/nd91
android project dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/nd91/proj.
android

Publish plugin for android
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/nd91/proj.android /cygdrive/d/coc
os2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools

BUILD SUCCESSFUL
Total time: 0 seconds

BUILD FAILED
d:\android\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:542: Unable to resolve project target 'android-7'

Total time: 0 seconds
cp: cannot stat `/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/nd91/proj.androi
d/bin/*.jar': No such file or directory
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plu
gin/tools
---------------------------------

Now publish admob
---------------------------------
target dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/publish/plugins/admob
android project dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/admob/proj
.android

Publish plugin for android
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/admob/proj.android /cygdrive/d/co
cos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools

BUILD SUCCESSFUL
Total time: 0 seconds

BUILD FAILED
d:\android\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:542: Unable to resolve project target 'android-7'

Total time: 0 seconds
cp: cannot stat `/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/admob/proj.andro
id/bin/*.jar': No such file or directory
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plu
gin/tools
---------------------------------

Now publish twitter
---------------------------------
target dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/publish/plugins/twitter
android project dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/twitter/pr
oj.android

Publish plugin for android
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/twitter/proj.android /cygdrive/d/
cocos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools

BUILD SUCCESSFUL
Total time: 0 seconds

BUILD FAILED
d:\android\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:542: Unable to resolve project target 'android-7'

Total time: 0 seconds
cp: cannot stat `/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/twitter/proj.and
roid/bin/*.jar': No such file or directory
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plu
gin/tools
---------------------------------

Now publish weibo
---------------------------------
target dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/publish/plugins/weibo
android project dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/weibo/proj
.android

Publish plugin for android
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/weibo/proj.android /cygdrive/d/co
cos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools

BUILD SUCCESSFUL
Total time: 0 seconds

BUILD FAILED
d:\android\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:542: Unable to resolve project target 'android-7'

Total time: 0 seconds
cp: cannot stat `/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/weibo/proj.andro
id/bin/*.jar': No such file or directory
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plu
gin/tools
---------------------------------

Now publish qh360
---------------------------------
target dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/publish/plugins/qh360
android project dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/qh360/proj
.android

Publish plugin for android
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/qh360/proj.android /cygdrive/d/co
cos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools

BUILD SUCCESSFUL
Total time: 0 seconds

BUILD FAILED
d:\android\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:542: Unable to resolve project target 'android-17'

Total time: 0 seconds
cp: cannot stat `/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/qh360/proj.andro
id/bin/*.jar': No such file or directory
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plu
gin/tools
---------------------------------

Now publish uc
---------------------------------
target dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/publish/plugins/uc
android project dir is /cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/uc/proj.an
droid

Publish plugin for android
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/uc/proj.android /cygdrive/d/cocos
2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools

BUILD SUCCESSFUL
Total time: 0 seconds

BUILD FAILED
d:\android\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:542: Unable to resolve project target 'android-17'

Total time: 0 seconds
cp: cannot stat `/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/uc/proj.android/
bin/*.jar': No such file or directory
/cygdrive/d/cocos2d-x-3.0alpha1/plugin/tools /cygdrive/d/cocos2d-x-3.0alpha1/plu
gin/tools
---------------------------------

 일단 아래  2가지 에러로 축약이 됩니다.

BUILD FAILED
d:\android\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:542: Unable to resolve project target 'android-7'

cp: cannot stat `/cygdrive/d/cocos2d-x-3.0alpha1/plugin/plugins/uc/proj.android/bin/*.jar': No such file or directory

 Unable to resolve project target 에러는 제 블로그에서도 검색해보시면 아시겠지만 이미 정리했던 이슈죠. 링크를 참고해서 안드로이드 SDK 메니저를 통해 필요로하는 안드로이드 SDK 버전을 설치하거나 아래 그림과 같이 오류가 발생하는 플러그인의 project.properties 파일에 있는 target=android-7 과 같은 부분을 각자의 환경에 맞게 변경해줍니다. 아무래도 Cocos2d-x 측에서 요구하는 사항으로 해주는게 좋을 듯 싶어 저는 필요 SDK를 설치하는 방향으로 처리했습니다.



 No such file or directory 에러는 위 과정을 해주면 자동으로 처리 될 문제이구요. 다시 ./publish.sh 실행해보면 아래와 같이 jar 프로젝트가 빌드되어 libPluginAdmob.jar와 같은 플러그인들이 복사된 것을 확인할 수 있습니다.

이 블로그의 인기 게시물

CMake Windows에 설치하기

'xxx.exe' 프로그램을 시작할 수 없습니다. 지정된 파일을 찾을 수 없습니다.

Unity3D 안드로이드 Keystore 생성하기