android.os.ServiceManager not found while building

只愿长相守 提交于 2020-01-01 17:25:18

问题


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;

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

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.

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

Please can anybody help me to solve this ?


回答1:


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



来源:https://stackoverflow.com/questions/13564281/android-os-servicemanager-not-found-while-building

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!