android – 在AOSP中修改SDK API

我试图在AOSP(主分支)中修改FingerprintGestureController API以返回布尔值而不是void,但即使重新编译SDK后,我仍然在构建项目时遇到错误.

错误是:

Failed: out/target/common/obj/PACKAGING/checkpublicapi-last-timestamp
/bin/bash -c "(( out/host/linux-x86/bin/apicheck -JXmx1024m -J\"classpath /usr/lib/jvm/java-8-openjdk-amd64/bin/../lib/tools.jar:out/host/linux-x86/framework/doclava.jar:out/host/linux-x86/framework/jsilver.jar\"  -hide 2 -hide 3 -hide 4 -hide 5 -hide 6 -hide 24 -hide 25 -hide 26 -hide 27 -error 7 -error 8 -error 9 -error 10 -error 11 -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error 18   prebuilts/sdk/api/26.txt  out/target/common/obj/PACKAGING/public_api.txt  frameworks/base/api/removed.txt  out/target/common/obj/PACKAGING/removed.txt || (  cat build/core/apicheck_msg_last.txt ; exit 38 ) ) ) && (mkdir -p out/target/common/obj/PACKAGING/ ) && (touch out/target/common/obj/PACKAGING/checkpublicapi-last-timestamp )"
out/target/common/obj/PACKAGING/public_api.txt:2874: error 16: Method android.accessibilityservice.FingerprintGestureController.FingerprintGestureCallback.onGestureDetected(int) has changed return type from Primitive?: true TypeVariable?: false Wildcard?: false Dimension:  QualifedTypeName: void to Primitive?: true TypeVariable?: false Wildcard?: false Dimension:  QualifedTypeName: boolean

******************************
You have tried to change the API from what has been prevIoUsly released in
an SDK.  Please fix the errors listed above.
******************************

我编译的步骤是:

lunch sdk-eng
make update-api   //Success
make sdk         //Success
lunch 1
make -j10      //Errors out here

有人可以指导我如何在源代码中更改android发布的SDK API并编译android.

解决方法

您需要确保使用方法签名更改更新了以下文件
/frameworks/base/api/current.txt
/frameworks/base/api/system-current.txt
/frameworks/base/api/test-current.txt

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...