React Native android build gradle debuggable false 不会关闭 __DEV__
嗨,我找不到任何答案解决方案,
我在\ android \ app \ build.gradle
我尝试过put 可辩论的false
> __ dev __ to false。
每个人都在说debug变体和发行版本,但是没有人告诉什么特定的切换到将__ dev __
更改为false。
请帮助谢谢。
buildTypes {
alpha {
signingConfig signingConfigs.dev
debuggable false
...
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
matchingFallbacks = ['release', 'debug']
}
}
另外,我尝试从MatchingFallbacks
删除“调试” 也无法正常工作。
matchingFallbacks = ['release']
Hi I cannot found any answer solution for this
I have follwoing custom variant in \android\app\build.gradle
I have tried put debuggable false
But this does not changed __DEV__
to false.
Everyone is telling debug variant and release variant but nobody is telling how exactly a specific toggle to change __DEV__
to false.
Please help thanks.
buildTypes {
alpha {
signingConfig signingConfigs.dev
debuggable false
...
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
matchingFallbacks = ['release', 'debug']
}
}
also I have tried removed 'debug' from matchingFallbacks
not working as well.
matchingFallbacks = ['release']
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果我没有误解,那么您在看错。如下所述。
REECT Native Dev and prod变量
只要您在模拟器上运行应用程序的应用程序,
__ dev __
变量是正确的。您可以尝试在使用
的模拟器中运行-Configuration Release
If im not mistaking you are looking at it wrong. As the link below mentions.
React Native DEV and PROD variables
As long as your running the app on emulators the
__DEV__
variable will be true.You can try to run in a simulator with
--configuration Release
我也遇到这个问题,就我而言,
buildType
名称应包含“ repares”关键字。 (不要问我为什么)将
alpha
更改为alpharelease
,一切都很好。示例:(
我正在使用RN 0.68.2)
I'm experiencing this problem too, in my case the
buildType
name should contain "release" keyword. (don't ask me why)Change
alpha
toalphaRelease
and everything should works fine.Example:
(I'm using RN 0.68.2)