@Override public Application newApplication(ClassLoader cl, String className, Context context) throws InstantiationException, IllegalAccessException, ClassNotFoundException { return super.newApplication(cl, PreferenceRoomApplication.class.getName(), context); } }
@Override public Application newApplication(ClassLoader cl, String className, Context context) throws ClassNotFoundException, IllegalAccessException, InstantiationException { DexOpener.install(this); // Call me first! // FIXME needed until https://github.com/mockito/mockito/issues/1472 is resolved System.setProperty("org.mockito.android.target", context.getCacheDir().getAbsolutePath()); return super.newApplication(cl, className, context); } }
@Override public Application newApplication(ClassLoader cl, String className, Context context) throws ClassNotFoundException, IllegalAccessException, InstantiationException { DexOpener.install(this); // Call me first! // FIXME needed until https://github.com/mockito/mockito/issues/1472 is resolved System.setProperty("org.mockito.android.target", context.getCacheDir().getAbsolutePath()); return super.newApplication(cl, className, context); } }
@Override public Application newApplication(ClassLoader cl, String className, Context context) throws ClassNotFoundException, IllegalAccessException, InstantiationException { DexOpener.install(this); return super.newApplication(cl, className, context); } }
@Override public Application newApplication(ClassLoader cl, String className, Context context) throws ClassNotFoundException, IllegalAccessException, InstantiationException { DexOpener.install(this); // Call me first! // FIXME needed until https://github.com/mockito/mockito/issues/1472 is resolved System.setProperty("org.mockito.android.target", context.getCacheDir().getAbsolutePath()); return super.newApplication(cl, className, context); } }
@Override public Application newApplication(ClassLoader cl, String className, Context context) throws ClassNotFoundException, IllegalAccessException, InstantiationException { DexOpener.install(this); // Call me first! // FIXME needed until https://github.com/mockito/mockito/issues/1472 is resolved System.setProperty("org.mockito.android.target", context.getCacheDir().getAbsolutePath()); // Do not call `Class#getName()` here. Otherwise, an `IllegalAccessError` saying `Class ref // in pre-verified class ...` may occur. return super.newApplication(cl, "com.example.dexopener.replaceapp.TestApp", context); } }