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

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

  •  
  •   kpppp · 2020-07-13 15:10:24 +08:00 · 3760 次点击
    这是一个创建于 1382 天前的主题,其中的信息可能已经有所发展或是发生改变。

    最近编译源码 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-07-13 19:42:29 +08:00
    "I"开头的 AIDL 代表接口吧,这个 IoStats 又不是个接口,就过滤掉了
    kpppp
        2
    kpppp  
    OP
       2020-07-14 09:49:24 +08:00
    @Madcrow 应该是,我后面写了 demo 验证,就是不知道是哪个 mk 文件 或者 脚本来做的这个判断。
    Madcrow
        3
    Madcrow  
       2020-07-14 10:39:08 +08:00
    AIDL 解析工具在 system/tools/aidl 目录下,没看到如何解析首字母的地方,你可以找找😂
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1220 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 23:11 · PVG 07:11 · LAX 16:11 · JFK 19:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.