使用 AOSP 更改构建自定义 SDK [英] Build custom SDK with AOSP changes

查看:53
本文介绍了使用 AOSP 更改构建自定义 SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 android studio 中构建我的应用程序(使用许多隐藏的 api 和属性).我已经修改了 AOSP 代码以公开这些隐藏的 api.为了使构建成功,我将 classes.jar 作为外部库添加到我的项目中.但这并不能解决问题.它仍然显示错误:

I am trying to build my app (uses many hidden api and properties) in android studio. I have modified the AOSP code to expose these hidden apis. In order to make the build successful I have added the classes.jar as the external lib to my project. But that doesn't resolve the issue. It was still showing errors :

error: cannot find symbol method getService()   
error: cannot find symbol variable userSetLocale    
error: cannot find symbol method getInstance()  
error: cannot find symbol variable INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH  
error: cannot find symbol variable INJECT_INPUT_EVENT_MODE_ASYNC    

现在我正在尝试使用修改后的 AOSP 代码制作自定义 SDK.

Now I am trying to make the custom SDK with this modified AOSP code.

注意:已经尝试过以下解决方案,但失败了

Note : Already tried and failed with the following solutions

如何构建具有可用隐藏和内部 API 的 Android SDK?

https://github.com/anggrayudi/android-hidden-api

任何人都可以根据修改后的 AOSP 代码帮助构建自定义 SDK

Can anyone help to build custom SDK based on the modified AOSP code

推荐答案

我通过改变app.iml中sdk的orderEntry并在modules build.gradle中给出framework.jar的绝对路径解决了这个问题

I solved the issue by changing the orderEntry of sdk in app.iml and giving the absolute path of framework.jar in modules build.gradle

这篇关于使用 AOSP 更改构建自定义 SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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