Closed Drjacky closed 6 years ago
I think this is because your class "DebugApplication" isn't on the main directory and in your debug Manifest you should use android:name=".DebugApplication"
The only thing wich you need in your debug directory is your debug Manifest.
I have the same problem.
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0'
implementation 'com.facebook.stetho:stetho:1.5.0'
to your App build.gradle file.CustomApplication
's onCreate
method:
private void initStetho() {
if (BuildConfig.DEBUG) {
Stetho.initialize(
Stetho.newInitializerBuilder(this)
.enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
.enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
.build()
);
}
}
builder.addNetworkInterceptor(new StethoInterceptor());
to the OkHttpClient.Builder
instance.
I've used this tutorial: http://littlerobots.nl/blog/stetho-for-android-debug-builds-only/ to use Stetho in debug build only. I have 2 custom classes which extended
Application
:And
Now the Debug class:
And in main AndroidManifest.xml:
And in debug AndroidManifest.xml:
But when I run the App, I get this error: