简体   繁体   English

build.xml:找不到:build_common.xml

[英]build.xml: Cannot find: build_common.xml

I'm trying to integrate the Facebook plugin into fresh new cocos-js 3.7 project. 我正在尝试将Facebook插件集成到新的cocos-js 3.7项目中。 Following steps from: http://cocos2d-x.org/docs/manual/framework/html5/facebook-sdk/facebook-sdk-on-android/en and also from my existing 3.5 project where this plugin works well. 请遵循以下步骤: http : //cocos2d-x.org/docs/manual/framework/html5/facebook-sdk/facebook-sdk-on-android/en以及我现有的3.5项目,该插件都可以很好地工作。

When compiling I get this error: 编译时出现此错误:

BUILD FAILED
/Applications/adt-bundle-mac-x86_64-20130729/sdk/tools/ant/build.xml:470: The following error occurred while executing this line:
/pp/src/shared_js/cocos/3.7/frameworks/cocos2d-x/plugin/protocols/proj.android/build.xml:90: Cannot find /pp/src/shared_js/cocos/3.7/frameworks/cocos2d-x/plugin/protocols/proj.android/${plugin.dir}/tools/android/build_common.xml imported from /pp/src/shared_js/cocos/3.7/frameworks/cocos2d-x/plugin/protocols/proj.android/build.xml

The last line in cocos2d-x/plugin/protocols/proj.android/build.xml has: cocos2d-x/plugin/protocols/proj.android/build.xml的最后一行具有:

<!-- version-tag: 1 -->
<import file="${plugin.dir}/tools/android/build_common.xml" />

which causes the problem. 这导致了问题。

Where do I define the search path for the ant imports? 在哪里定义蚂蚁进口的搜索路径?

My Android.mk: 我的Android.mk:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := cocos2djs_shared

LOCAL_MODULE_FILENAME := libcocos2djs

LOCAL_SRC_FILES := hellojavascript/main.cpp \
                   ../../Classes/AppDelegate.cpp 

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes

##############################################################################################################
# Library lists
##############################################################################################################

# <Pp> this prevents bugs with += and :=
#
LOCAL_STATIC_LIBRARIES :=
LOCAL_WHOLE_STATIC_LIBRARIES :=

# cocos 3.7
#
LOCAL_STATIC_LIBRARIES += cocos2d_js_static

# plugin: ALL (JS & C++)
# plugin: FB
#
# <REF> /pp/dev-cpp/libs/cocos2d-js-v3.5/samples/js-tests/project/proj.android/jni/Android.mk
#
LOCAL_STATIC_LIBRARIES += jsb_pluginx_static


# plugin: ALL (JS & C++)
# plugin: FB
#
LOCAL_WHOLE_STATIC_LIBRARIES += PluginProtocolStatic

##############################################################################################################
# Flags, etc.
##############################################################################################################


# cocos 3.7
#
LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2 -DCOCOS2D_JAVASCRIPT

# cocos 3.7
#
include $(BUILD_SHARED_LIBRARY)


##############################################################################################################
# Module search paths
##############################################################################################################


# Pp: believed to be required by plugins and also some other staff...
#
$(call import-add-path,$(LOCAL_PATH)/../../../../frameworks/cocos2d-x/plugin/publish)
$(call import-add-path,$(LOCAL_PATH)/../../../../frameworks/cocos2d-x/external)
$(call import-add-path,$(LOCAL_PATH)/../../../../frameworks/cocos2d-x/cocos)

# Pp (after upgrade to cocos 3.7)
#
$(call import-add-path,$(LOCAL_PATH)/../../../../frameworks)

# Soomla (also generic)
#
$(call import-add-path,$(LOCAL_PATH)/../../../../frameworks/cocos2d-x)

##############################################################################################################
# Import Modules
##############################################################################################################

# cocos 3.7
#
$(call import-module, scripting/js-bindings/proj.android)


# plugin: ALL (JS)
# plugin: FB
#
# <REF> /pp/dev-cpp/libs/cocos2d-js-v3.5/samples/js-tests/project/proj.android/jni/Android.mk
#
#
$(call import-module,cocos2d-x/plugin/jsbindings)


# plugin: ALL (C++)
# plugin: FB
#
# <REF> /pp/src/shared_js/cocos/3.5/frameworks/js-bindings/cocos2d-x/plugin/samples/HelloPlugins/proj.android/jni/Android.mk
#
$(call import-module,plugin/protocols/proj.android/jni)

Solved with the following steps. 解决了以下步骤。 Likely it is not a correct way because it involves manual modification of local.properties but it works. 可能这不是正确的方法,因为它涉及手动修改local.properties但它可以工作。

1. bug 1.错误

/Applications/adt-bundle-mac-x86_64-20130729/sdk/tools/ant/build.xml:470: The following error occurred while executing this line:
/pp/src/shared_js/cocos/3.8/frameworks/cocos2d-x/plugin/protocols/proj.android/build.xml:90: Cannot find /pp/src/shared_js/cocos/3.8/frameworks/cocos2d-x/plugin/protocols/proj.android/${plugin.dir}/tools/android/build_common.xml imported from /pp/src/shared_js/cocos/3.8/frameworks/cocos2d-x/plugin/protocols/proj.android/build.xml

fix: 固定:

    $ vi /pp/src/shared_js/cocos/3.8/frameworks/cocos2d-x/plugin/protocols/proj.android/local.properties

    # add this line
    plugin.dir=../..

2. bug 2.错误

/Applications/adt-bundle-mac-x86_64-20130729/sdk/tools/ant/build.xml:470: The following error occurred while executing this line:
/pp/src/shared_js/cocos/3.8/frameworks/cocos2d-x/plugin/plugins/facebook/proj.android/build.xml:90: Cannot find /pp/src/shared_js/cocos/3.8/frameworks/cocos2d-x/plugin/plugins/facebook/proj.android/${plugin.dir}/tools/android/build_common.xml imported from /pp/src/shared_js/cocos/3.8/frameworks/cocos2d-x/plugin/plugins/facebook/proj.android/build.xml

fix 固定

    $ vi /pp/src/shared_js/cocos/3.8/frameworks/cocos2d-x/plugin/plugins/facebook/proj.android/local.properties

    # add this line
    plugin.dir=../../..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM