alinz / react-native-webview-bridge

React Native Webview with Javascript Bridge
MIT License
1.37k stars 491 forks source link

"Uncaught TypeError: WebViewBridge.send is not a function", source: (1) #182

Open 1610449813 opened 7 years ago

1610449813 commented 7 years ago

in release,android can not use this WebViewBridge.send method,debug,andoird work fine

1610449813 commented 7 years ago

andoird:5.0 RN:0.39.0 MAC OS 10.12.1

lee11qian commented 7 years ago

I have the same problem. RN:0.36.1 react-native-webview-bridge:0.33.0

lee11qian commented 7 years ago

I know the problem. Because in release I open def enableProguardInReleaseBuilds = true(in build.gradle).In order to sovle this question, add this line in file proguard-rules.pro:

-keep class com.github.alinz.reactnativewebviewbridge.** {*;}