Unable to instantiate receiver java.lang.ClassNotFoundException

前端 未结 4 757
醉酒成梦
醉酒成梦 2020-12-17 23:17

I got an error in my android application when it tries to instantiate a receiver that i use to start a service on boot up. The error is obvious, it can not find the class fi

4条回答
  •  时光取名叫无心
    2020-12-17 23:35

    You have to put your Receiver in some package. The system won't be able to instantiate it if it is on the main package.

    I had the same problem. Fortunately before searching the error on internet I was doing another java project. I just realized that the bug in there was similar to this one. I tried it just now and worked. :)

提交回复
热议问题