Build Error using Build Native App v1.0.131

0
Hi    Am using 9.24.16 with Build Native App v1.0.131 and Template v7.0.9 to attempt to build an Android package in the cloud using GitHub and AppCenter (this has all worked before but not with this new version and not been tried for a while).   I get a build error and in the logs can see this:   2024-03-05T15:57:22.5180670Z > Task :react-native-webview:compileReleaseJavaWithJavac FAILED2024-03-05T15:57:22.5281190Z /Users/runner/work/1/s/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java:277: error: cannot find symbol2024-03-05T15:57:22.5382480Z         view.getSettings().setAppCachePath(ctx.getCacheDir().getAbsolutePath());2024-03-05T15:57:22.5482780Z                           ^2024-03-05T15:57:22.5584100Z   symbol:   method setAppCachePath(String)2024-03-05T15:57:22.5684760Z   location: class WebSettings   A few times. This seems to be a known issue with version of webview below 11.22.7 (https://github.com/react-native-webview/react-native-webview/issues/2547) but I cannot work out how to resolve the issue with Mendix dependencies etc. (if I try and change in the repo, the file is overwritten in any case).   Does anyone have any ideas?   Cheers
asked
1 answers
0

Should anyone run into this - the issue was related to a market place module which contained a widget which referenced the react-native-webview with a version below 11.26.1 and hence Mendix added it as a dependency in the build. This is not compatible with Android SDK target of 33.

 

To fix I modified the widgets <widget>.json (inside the MPK file - in this case com.itvisors.widget.native.NativeSignature.mpk) to reference the correct version of the webview. dependency.

 

To find it, I had to search for .json files in the project folder which contained a reference to react-native-webview - this led me to the deployed widget files, and from there I inferred the most likely marketplace module.

answered