Android: Unable to instantiate application

前端 未结 11 1565
别跟我提以往
别跟我提以往 2021-01-03 23:40

I renamed my package and now I get this strange error:

Unable to instantiate application
app.MyApplication: java.lan         


        
11条回答
  •  半阙折子戏
    2021-01-04 00:15

    I faced this issue as long as a day, finally i solved it, I had a mistake in Application class declaration, you need set your application class public like this:

    public class AppController extends Application { }

    My code that is wrong: class AppController extends Application { }

提交回复
热议问题