tags:

views:

70

answers:

1

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 android::name for my application: <application android:name=".MyApp" ...

However, when I attempt to run my app, I get: java.lang.RuntimeException: Unable to instantiate application com.test.MyApp java.lang.IllegalAccessException: access to class not allowed

+2  A: 

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

CommonsWare