android应用程序访问隐藏的api
来源:互联网 发布:华润网络深圳有限公司 编辑:程序博客网 时间:2024/04/29 20:09
前言
在android系统开发中需要添加一些aidl文件。 这些aidl是hide的,应用程序无法直接的使用,从而引出了应用程序如何访问内部内藏的api接口
步骤
1.android在编译完成后,会生成framework.jar。难道应用程序要使用这个framework.jar吗?
其实不是的,需要使用的是
out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/class.jar
这个class.jar文件
2.在android studio中,将这个class.jar作为一个module加入工程
File->Project structure -> +(左上角) > 选择 import .jar (导入jar包)-> Moduless下出现classes -> 选择app下 dependencise -> + (右上角)> 添加 module,选择添加的classes,同时将compile 修改为provides
3. 在app下的build.gradule下添加 dexOptions {
javaMaxHeapSize “4g”
}
4.在工程app下的android defaultconfig 下添加 mutiDexEnabled true
5. app下 dependencies {
compile ’com.android.support:multidex:1.0.0‘
}
6.在Minifest application 中添加
android:name =”android.support.multidex.MultiDexApplication”
总结
在android系统开发中通过这样的方式,就可以访问一些内部的接口文件。
参考文献
How do I build the Android SDK with hidden and internal APIs available?
Creating a module library and adding it to module dependencies
Android Studio Google jar causing GC overhead limit exceeded error
Building Apps with Over 65K Methods
- android应用程序访问隐藏的api
- android 访问隐藏API
- Android隐藏应用程序的图标
- 利用Java反射机制-访问Android隐藏API
- 利用Java反射机制-访问Android隐藏API
- Android应用程序的隐藏与退出
- Android 应用程序的隐藏与退出
- 如何隐藏android应用程序的启动图标
- Android 如何隐藏应用程序的图标
- Android 如何隐藏应用程序的图标
- Android 如何隐藏应用程序的图标
- Android 如何隐藏应用程序的图标
- Android 如何隐藏应用程序的图标
- Android 如何隐藏应用程序的图标
- Android 如何隐藏应用程序的图标
- Android 如何隐藏应用程序的图标
- Android 如何隐藏应用程序的图标
- Android 如何隐藏应用程序的图标
- c++设计模式总结
- S3C2440时钟电源管理
- 蓝桥杯 扶老奶奶过街
- 在浏览器地址栏按回车、F5、Ctrl+F5刷新网页的区别
- S3C2440PWM 定时器
- android应用程序访问隐藏的api
- mysql中的判断是否有该条数据 如果有返回1 没有返回0
- tomcat缓存静态资源深入
- odeforces 615A. Bulbs
- 实现windows程序的数据绑定第五章
- [小插曲] vs2013 MFC 串口上位机设计的学习
- FileZilla远程管理无法登录
- Android Studio导入工程报错[Plugin with id 'com.android.application' not found]
- POI设置导出的EXCEL锁定指定的单元格