zoukankan      html  css  js  c++  java
  • Android源码下载和编译Tips

    1. Download a specific version:
    repo init -u git://android.git.kernel.org/platform/manifest.git -b android-2.3.4_r1
    repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo

    2. Download protocol:

    You can use both the the git:// or the http:// and even there is a possibility to set the $GIT_SSH (man git for more information).

    After repo inited, for "repo sync", we can change the download protocol by modifying .repo/manifest.xml

    3. 遇到错误:

    build/core/base_rules.mk:78: *** Module name: jsilver
    build
    /core/base_rules.mk:79: *** Makefile location: external/jsilver
    build
    /core/base_rules.mk:80: *
    build
    /core/base_rules.mk:81: * Each module must use a LOCAL_MODULE_TAGS in its
    build
    /core/base_rules.mk:82: * Android.mk. Possible tags declared by a module:
    build
    /core/base_rules.mk:83: *
    build
    /core/base_rules.mk:84: *     optional, debug, eng, tests, samples
    build
    /core/base_rules.mk:85: *
    build
    /core/base_rules.mk:86: * If the module is expected to be in all builds
    build
    /core/base_rules.mk:87: * of a product, then it should use the
    build
    /core/base_rules.mk:88: * "optional" tag:
    build
    /core/base_rules.mk:89: *
    build
    /core/base_rules.mk:90: *    Add "LOCAL_MODULE_TAGS := optional" in the
    build
    /core/base_rules.mk:91: *    Android.mk for the affected module, and add
    build
    /core/base_rules.mk:92: *    the LOCAL_MODULE value for that component
    build
    /core/base_rules.mk:93: *    into the PRODUCT_PACKAGES section of product
    build
    /core/base_rules.mk:94: *    makefile(s) where it's necessary, if
    build
    /core/base_rules.mk:95: *    appropriate.
    build
    /core/base_rules.mk:96: *
    build
    /core/base_rules.mk:97: * If the component should be in EVERY build of ALL
    build
    /core/base_rules.mk:98: * products, then add its LOCAL_MODULE value to the
    build
    /core/base_rules.mk:99: * PRODUCT_PACKAGES section of
    build
    /core/base_rules.mk:100: * build/target/product/core.mk
    build
    /core/base_rules.mk:101: *
    build
    /core/base_rules.mk:102: *** user tag detected on new module - user tags are only supported on legacy modules.  Stop.

    This is due to the declaration of LOCAL_MODULE_TAGS. To fix it just follow the instructions that suggest including the optional tag. Thanks to [10] for the command line that replace user tag by optional tag on every affected file.

    用这个命令行将所有user改成optional即可:

    find ./ -exec grep -l "LOCAL_MODULE_TAGS := user" {} \; -exec sed -i.bak s/"LOCAL_MODULE_TAGS := user"/"LOCAL_MODULE_TAGS := optional"/g {} \;

  • 相关阅读:
    【WP开发】WebView控件应用要点
    【WP开发】认清“不透明度”与“可见性”的区别
    分享:自学编程的方法
    <C#>找出数组中重复次数最多的数值
    【WP 8.1开发】上下文菜单
    【WP 8.1开发】同时更新多种磁贴
    【WP开发】如何处理溢出的文本
    lnmp/nginx系统真正有效的图片防盗链完整设置详解
    PHP自动加载SPL的四种处理方式
    算法笔记-判断链表保存的字符串是否是回文
  • 原文地址:https://www.cnblogs.com/super119/p/2170089.html
Copyright © 2011-2022 走看看