V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
kpppp
V2EX  ›  Android

Android 编译问题,求个大佬进来看看。

  •  
  •   kpppp · 2020 年 7 月 13 日 · 11261 次点击
    这是一个创建于 2025 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近编译源码 Android9.0
    在 mk 里面遇到一个奇怪的注释:

    IoStats are parcelable types (vs. interface types), but the build system uses an initial I as a magic marker to mean "interface", and due to this ends up refusing to compile these files as part of the build process.
    A clean solution to this is actively being worked on by the build team, but is not yet available, so for now we just filter the files out by hand.
    *

    car_lib_sources := $(filter-out src/android/car/storagemonitoring/IoStats.aidl,$(car_lib_sources)) car_lib_sources := $(filter-out src/android/car/storagemonitoring/IoStatsEntry.aidl,$(car_lib_sources))

    public final class IoStatsEntry implements Parcelable {
    ...省略代码
    }
    public class IoStats implements Parcelable {
    ...省略代码
    }
    

    为什么在编译的时候,把这两个I开头的 aidl 文件过滤掉?这个是系统的规则嘛?

    3 条回复    2020-07-14 10:39:08 +08:00
    Madcrow
        1
    Madcrow  
       2020 年 7 月 13 日
    "I"开头的 AIDL 代表接口吧,这个 IoStats 又不是个接口,就过滤掉了
    kpppp
        2
    kpppp  
    OP
       2020 年 7 月 14 日
    @Madcrow 应该是,我后面写了 demo 验证,就是不知道是哪个 mk 文件 或者 脚本来做的这个判断。
    Madcrow
        3
    Madcrow  
       2020 年 7 月 14 日
    AIDL 解析工具在 system/tools/aidl 目录下,没看到如何解析首字母的地方,你可以找找😂
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2807 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 15:16 · PVG 23:16 · LAX 07:16 · JFK 10:16
    ♥ Do have faith in what you're doing.