相关疑难解决方法(0)

为什么Android服务因NullPointerException而崩溃?

这是代码:

public class BillingService extends Service implements ServiceConnection {
...
    @Override
    public void onStart(Intent intent, int startId) {
        handleCommand(intent, startId); // line 361
    }

    /**
     * The {@link BillingReceiver} sends messages to this service using intents.
     * Each intent has an action and some extra arguments specific to that action.
     * @param intent the intent containing one of the supported actions
     * @param startId an identifier for the invocation instance of this service
     */
    public void handleCommand(Intent intent, int startId) …
Run Code Online (Sandbox Code Playgroud)

service android nullpointerexception android-service

8
推荐指数
1
解决办法
1万
查看次数