यहां एक अच्छा लेख मिला: http://tekeye.biz/2013/android-debug-vs-release-build।
ने इसका भी परीक्षण किया। अगर हम प्रकट आवेदन पर android:debuggable="false"
या android:debuggable="true"
मजबूर है, यह चेतावनी देगा:
Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one less...
It's best to leave out the android:debuggable attribute from the manifest. If you do, then the tools will automatically insert android:debuggable=true when building an APK to debug on an emulator or device. And when you perform a release build, such as Exporting APK, it will automatically set it to false.
If on the other hand you specify a specific value in the manifest file, then the tools will always use it. This can lead to accidentally publishing your app with debug information.
मैं निष्कर्ष निकालना होता है, डिफ़ॉल्ट स्थिति में android:debuggable
बदल रहा है, जो कुछ उचित नहीं है द्वारा BuildConfig.DEBUG
रूप में एक ही व्यवहार करते हैं ApplicationInfo.FLAG_DEBUGGABLE
, जब तक ओवरराइड।
BuildConfig.DEBUG
को, ApplicationInfo.FLAG_DEBUGGABLE
डीबग बिल्ड के लिए जाँच करने के लिए, एक कम निर्भर मॉड्यूल में के रूप में, यह माता पिता के मॉड्यूल के BuildConfig.DEBUG
उपयोग नहीं कर सकते हैं, और एक मान अलग हो सकता एक और अधिक विश्वसनीय तरीका है की तुलना करें।
उदा। ऐप MyLib मॉड्यूल का उपयोग करें। ऐप का BuildConfig.DEBUG
गलत हो सकता है, लेकिन MyLib BuildConfig.DEBUG
सत्य हो सकता है। इसलिए ApplicationInfo.FLAG_DEBUGGABLE
डीबग का उपयोग क्या है जहां डिबगबल गलत है? – Elye
मैं ऐसे मामले को याद नहीं कर सकता, क्षमा करें। – azizbekian