android cupcake 去掉@hide 标 后的编译问题

leozhang2002 leozhang2002 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我想使用AssetManager 这个类的接口,可是sdk 居然没有开放这个类的构造函数,所有接口都没法使用啊~~~(不是静态类)

我了解到cupcake 代码中很多JAVA 接口打了@hide 标。我编辑cupcake 代码,去掉了AssetManager 类中无需要使用的方法的@hide 标,然后在current.xml 文件中加了相应接口。然后编译,却出了下面的错误。

我想知道怎么才能在自己写的程序里使用这些被hide 的接口。怎么修改编译选项,通过cupcake 编译出开放这些接口的sdk,供自己编程使用?
那个p4 edit 是什么,从哪里下载?

build/core/product_config.mk:211: WARNING: adding test OTA key
============================================
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=
============================================
build/core/main.mk:180: implicitly installing apns-conf_sdk.xml
Checking API: checkapi-last
(unknown): warning 19: Class
android.widget.PopupWindow.OnDismissListener scope changed from to
public
(unknown): warning 19: Method android.view.View.getHandler changed
scope from protected to public
(unknown): warning 21: Method
android.hardware.Camera.setPreviewDisplay added thrown exception
java.io.IOException
(unknown): warning 21: Method android.media.MediaRecorder.prepare
added thrown exception java.io.IOException
(unknown): warning 21: Method java.util.logging.Level.parse added
thrown exception java.lang.IllegalArgumentException
Checking API: checkapi-current
(unknown): error 4: Added public method
android.content.res.AssetManager.addAssetPath
(unknown): error 9: Removed public method
android.content.res.AssetManager.addAssetPath

******************************
You have tried to change the API from what has been previously approved.

To make these errors go away, you have two choices:
1) You can add "@hide" javadoc comments to the methods, etc. listed in the
errors above.

2) You can update current.xml by executing the following commands:

p4 edit frameworks/base/api/current.xml
make update-api

To check in the revised current.xml, you will need OWNERS approval.
******************************



make: *** [out/target/common/obj/PACKAGING/checkapi-current-timestamp] erroe 38
...全文

相关推荐

评论 4
收藏 已收藏
分享
返回顶部
leozhang2002
J2ME 13,096 成员 26,491 内容