android的一个编译问题
16lz
2021-12-04
错误信息:
Checking API: checkapi-last
(unknown): error 17: Field android.hardware.Camera.CameraInfo.CAMERA_FACING_BACK has changed value from 0 to 1
(unknown): error 17: Field android.hardware.Camera.CameraInfo.CAMERA_FACING_FRONT has changed value from 1 to 0
******************************
You have tried to change the API from what has been previously released in
an SDK.Please fix the errors listed above.
*****************************
make: *** [out/target/common/obj/PACKAGING/checkapi-last-timestamp] Error 38
make: *** Waiting for unfinished jobs....
htmlDir not a directory: out/target/common/docs/gen
DroidDoc took 243 sec. to write docs to out/target/common/docs/doc-comment-check
原因是修改了framework中的变量的值,使得源码之前的api 的值与新的不一样,从而报错。
修改:
找到android api对应的文件,例如,android2.3 对应的api level 是9,则把9.xml(frameworks\base\api\)中的CAMERA_FACING_BACK/CAMERA_FACING_FRONT 修改成所想要的。
附:android api level:
Android 3.0 - honeycomb
Android 2.3.3 - API Level 10
Android 2.3 - API Level 9
2.2 - 8
2.1 - 7
2..0.1 - 6
2.0 - 5
1.6 - 4
1.5 -3
1.1 - 2
Android 1.0 - API Level 1
Checking API: checkapi-last
(unknown): error 17: Field android.hardware.Camera.CameraInfo.CAMERA_FACING_BACK has changed value from 0 to 1
(unknown): error 17: Field android.hardware.Camera.CameraInfo.CAMERA_FACING_FRONT has changed value from 1 to 0
******************************
You have tried to change the API from what has been previously released in
an SDK.Please fix the errors listed above.
*****************************
make: *** [out/target/common/obj/PACKAGING/checkapi-last-timestamp] Error 38
make: *** Waiting for unfinished jobs....
htmlDir not a directory: out/target/common/docs/gen
DroidDoc took 243 sec. to write docs to out/target/common/docs/doc-comment-check
原因是修改了framework中的变量的值,使得源码之前的api 的值与新的不一样,从而报错。
修改:
找到android api对应的文件,例如,android2.3 对应的api level 是9,则把9.xml(frameworks\base\api\)中的CAMERA_FACING_BACK/CAMERA_FACING_FRONT 修改成所想要的。
附:android api level:
Android 3.0 - honeycomb
Android 2.3.3 - API Level 10
Android 2.3 - API Level 9
2.2 - 8
2.1 - 7
2..0.1 - 6
2.0 - 5
1.6 - 4
1.5 -3
1.1 - 2
Android 1.0 - API Level 1
更多相关文章
- Android名称、版本和API level的对应关系
- Android(安卓)SDcard 文件读写,RandomAccessFile操作
- android Error inflating class com.google.android.material.ch
- Android中Broadcast的Intent大全
- Android(安卓)头像修改
- android 登陆右上角 的关闭按钮的使用方法
- Android(安卓)studio 3.0和unity交互 Manifest文件修改后正确的
- 解剖Android(安卓)USB MTP 的激活流程
- Android实在在app内部控制按键震动