Android: java.lang.IllegalAccessException when attempting to use a custom “Application” class

后端 未结 2 950
再見小時候
再見小時候 2020-12-05 22:58

I\'m trying to create define a custom Application class as follows:

  1. create an empty subclass of Application called MyApp
  2. in the manifest, specify andr
2条回答
  •  北海茫月
    2020-12-05 23:19

    Make sure your custom class is public, has a public zero-argument constructor, and that the constructor chains to the superclass' constructor.

提交回复
热议问题