android.os.ServiceManager not found while building

2020-07-22 09:29发布

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条回答
混吃等死
2楼-- · 2020-07-22 10:11

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

查看更多
登录 后发表回答