android cupcake 去掉@hide 标 后的编译问题
我想使用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