Caused by: java.lang.IllegalAccessException: java.lang.Class<foo.bar.MyApp> is not accessible from java.lang.Class<android.app.AppComponentFactory>
需要加上<application android:name=“.MyApplication” […] name字段
https://stackoverflow.com/questions/5859261/android-unable-to-instantiate-application