kpppp
V2EX  ›  Android

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

  •  
  •   kpppp · Jul 13, 2020 · 11789 views
    This topic created in 2154 days ago, the information mentioned may be changed or developed.

    最近编译源码 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 replies    2020-07-14 10:39:08 +08:00
    Madcrow
        1
    Madcrow  
       Jul 13, 2020
    "I"开头的 AIDL 代表接口吧,这个 IoStats 又不是个接口,就过滤掉了
    kpppp
        2
    kpppp  
    OP
       Jul 14, 2020
    @Madcrow 应该是,我后面写了 demo 验证,就是不知道是哪个 mk 文件 或者 脚本来做的这个判断。
    Madcrow
        3
    Madcrow  
       Jul 14, 2020
    AIDL 解析工具在 system/tools/aidl 目录下,没看到如何解析首字母的地方,你可以找找😂
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2891 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 05:46 · PVG 13:46 · LAX 22:46 · JFK 01:46
    ♥ Do have faith in what you're doing.