Import Library Only For Debugging
I am using stetho lib for debugging my app. Gradle: debugCompile 'com.facebook.stetho:stetho:1.4.1' debugCompile 'com.uphyca:stetho_realm:2.0.0' Application class: if (BuildConfi
Solution 1:
Just leave the unused imports as they are. Your approach of if (BuildConfig.DEBUG)
is perfectly valid. And frankly the best way to implement it.
Unused imports have no impact on performance: reference. There might be a trivial increase in compile time, but no increase in runtime.
Import statements don't make it to byte code.
You will need to change Gradle:
debugCompile 'com.facebook.stetho:stetho:1.4.1'
debugCompile 'com.uphyca:stetho_realm:2.0.0'
to
compile'com.facebook.stetho:stetho:1.4.1'compile'com.uphyca:stetho_realm:2.0.0'
Post a Comment for "Import Library Only For Debugging"