首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何从weex创建android项目

如何从weex创建android项目
EN

Stack Overflow用户
提问于 2017-05-28 21:18:01
回答 1查看 842关注 0票数 0

我不能从除草添加平台,只能从weexpack添加平台

代码语言:javascript
复制
drew@drew-Aspire-E1-571G ~/Work/Weex/awesome-project $ weexpack  platform add android
Error: Current working directory is not a weexpack project

而且我不能将weex编译到android项目中。

EN

回答 1

Stack Overflow用户

发布于 2017-05-30 07:52:08

如果您使用weex工具箱,您应该自己创建一些文件和dir,包括:

dirs:

  • 网站
  • 平台
  • 插件

档案:

  • android.config.json
  • ios.config.json
  • config.xml

编辑config.xml

代码语言:javascript
复制
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.alibaba.weex" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>MyApp1</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="dev@cordova.apache.org" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
</widget>

在当前版本中,还可以使用weex create创建weexpack项目。

当然,初学者工具包也可能对您有帮助:https://github.com/elemefe/weex-vue-starter-kit

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44232124

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档