构建时找不到android.os.ServiceManager [英] android.os.ServiceManager not found while building

查看:698
本文介绍了构建时找不到android.os.ServiceManager的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在构建android源代码时出现以下错误,我在其中添加了使用android.os.ServiceManager的自定义应用程序.

I am getting following error while building android source, where i have added my custom app which uses android.os.ServiceManager.

cannot find symbol
symbol  : class ServiceManager
location: package android.os
import android.os.ServiceManager;

为什么我会遇到此错误,实际上此导入可以在android源中的许多其他应用中找到.

Why am I facing this error, actually this import can be found in many other app in android source.

我正在按照 http://source.android.com/source构建android源代码/building.html 并且也遵循了这篇文章无法解析导入android.os.ServiceManager 答案.

I am building the android source as in http://source.android.com/source/building.html and also followed this post The import android.os.ServiceManager cannot be resolved answers.

有关更多信息,我在[android root]/packages/app/目录中构建

and for more info, I am building in [android root]/packages/app/ directory

请有人可以帮助我解决这个问题吗?

Please can anybody help me to solve this ?

推荐答案

已解决:)必须从Android.mk文件中删除LOCAL_SDK_VERSION := current

solved :) Have to remove LOCAL_SDK_VERSION := current from Android.mk file

这篇关于构建时找不到android.os.ServiceManager的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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