如何使用可用的隐藏和内部 API 构建 Android SDK? [英] How do I build the Android SDK with hidden and internal APIs available?

查看:32
本文介绍了如何使用可用的隐藏和内部 API 构建 Android SDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想重建 Android SDK(或者只是 android.jar)以包含隐藏的和内部的 API.

I want to rebuild the Android SDK (or rather only the android.jar) to include hidden and internal APIs.

我找不到任何有关如何解决此问题的文档或讨论.我已经设置了一个可以构建 cm7 的 Ubuntu CyanogenMod 构建环境.

I could not find any documentation or discussion doing on how to go about this. I have an Ubuntu CyanogenMod build environment already setup that is able to build cm7.

现在,我读到 make SDK 将构建 SDK,但我想构建一个 SDK,其中包含使用 @hide 标记为隐藏的方法和字段.这可能吗?

Now, I read that make SDK will build the SDK but I want to build an SDK that includes methods and fields that are marked as hidden using @hide. Is this possible?

我想做的是对使用隐藏 API 的应用程序进行更改,为了重建它,我想使用修改后的 SDK.

What I want to do is make changes to an application that uses hidden API and in order to rebuild it I would like to use the modified SDK.

推荐答案

这是我使用隐藏 api 的一贯做法.

This is what I always do to use hidden api.

  1. 构建 repo 或下载 jarshttps://sites.google.com/site/hippunosource/home/android/androidnohide-apiwo-shi-yongsuru-rifurekushonha-wei-shi-yong
  2. 复制out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jar(最好将其重命名为framework_all.jar之类的)
  3. 配置你的项目构建路径-->库-->添加这个外部jar.在 Order 和 Export 中,将其向上移动到 android.jar 之前

这篇关于如何使用可用的隐藏和内部 API 构建 Android SDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆