Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么集成到weex init创建的android项目中呢 #31

Closed
ding-hai opened this issue Jun 11, 2018 · 1 comment
Closed

怎么集成到weex init创建的android项目中呢 #31

ding-hai opened this issue Jun 11, 2018 · 1 comment

Comments

@ding-hai
Copy link

ding-hai commented Jun 11, 2018

使用weex init创建的项目,已经添加android 平台,请问怎么将bindingx集成到这个项目中,readme里面写的并不能和weex创建的项目很好的兼容,出现各种问题

  1. Error:Execution failed for task ':app:processDebugResources'. Error: more than one library with package name 'com.alibaba.weex.plugin.loader'
    发现com.taobao.android:weexplugin-loader:1.3和'org.weex.plugin:plugin-loader:1.0.0'包的名字重复,删除之后构建,又出现Error:Error converting bytecode to dex:
    Cause: com.android.dex.DexException: Multiple dex files define Lcom/alibaba/weex/plugin/annotation/WeexAdapter;
@ding-hai
Copy link
Author

ding-hai commented Jun 11, 2018

经过各种坑之后终于解决了,原来是bingx的插件加载的依赖和weex上默认的插件加载的包冲突只需要将

    // PLUGIN GRADLE EXTENSIONS START
//    compile 'com.taobao.android:weexplugin-loader:1.3'
//    compile 'com.taobao.android:weexplugin-processor:1.3'
//    compile 'com.taobao.android:weexplugin-annotation:1.3'
    // PLUGIN GRADLE EXTENSIONS END

这几个全都注释掉,加入

   compile 'com.alibaba.android:bindingx-core:1.0.1'
    compile 'com.alibaba.android:bindingx_weex_plugin:1.0.1'

这个时候会出现WXApplication这个类中 WeexPluginContainer.loadAll(this); 会提示找不到 WeexPluginContainer 将这一行注释掉,使用 BindingX.register(); 就可以了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants