So I make a webview and I get a lovely white screen with nothing on it and this in the error output
D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN W/linker: libwebviewchromium.so: unused DT entry: type 0x6ffffef5 arg 0x64b4 W/linker: libwebviewchromium.so: unused DT entry: type 0x6ffffffe arg 0x6454 W/linker: libwebviewchromium.so: unused DT entry: type 0x6fffffff arg 0x3 I/WebViewFactory: Loading com.google.android.webview version 83.0.4103.106 (code 410410650) I/cr_LibraryLoader: Loaded native library version number "83.0.4103.106" I/cr_CachingUmaRecorder: Flushed 3 samples from 3 histograms. D/SecWifiDisplayUtil: Metadata value : SecSettings2 D/ConnectivityManager: requestNetwork; CallingUid : 10126, CallingPid : 6806 E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY) E/chromium: [ERROR:gl_surface_egl.cc(549)] eglChooseConfig failed with error EGL_BAD_ATTRIBUTE W/cr_media: Requires BLUETOOTH permission E/chromium: [ERROR:gl_surface_egl.cc(549)] eglChooseConfig failed with error EGL_BAD_ATTRIBUTE W/System.err: mkdir failed: EEXIST (File exists) : /data/data/com.symbolicone.ouille/cache/WebView/Crash Reports W/AudioCapabilities: Unsupported mime audio/mpeg-L1 W/AudioCapabilities: Unsupported mime audio/mpeg-L2 W/AudioCapabilities: Unsupported mime audio/x-ms-wma W/AudioCapabilities: Unsupported mime audio/x-ima W/VideoCapabilities: Unrecognized profile/level 32768/2 for video/mp4v-es W/VideoCapabilities: Unrecognized profile/level 32768/2 for video/mp4v-es W/VideoCapabilities: Unsupported mime video/wvc1 W/VideoCapabilities: Unsupported mime video/x-ms-wmv W/VideoCapabilities: Unsupported mime video/x-ms-wmv7 W/VideoCapabilities: Unsupported mime video/x-ms-wmv8 W/VideoCapabilities: Unsupported mime video/mp43 I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es W/VideoCapabilities: Unsupported mime video/sorenson W/cr_MediaCodecUtil: HW encoder for video/avc is not available on this device. D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN
to which I don’t see why It need Bluetooth as its text on an image on a screen, nor does it need any of the video types. It is true that the /data/data/com.symbolicone.ouille/cache/WebView/Crash Reports folder exists, and it is also empty.
The code I use to make it is
#if CC_TARGET_PLATFORM != CC_PLATFORM_WIN32 auto webView = cocos2d::ui::WebView::create(); webView->loadFile(m_htmlFile); webView->setAnchorPoint(Point(0.0f,0.0f)); webView->setPosition(Point(0.0f,0.0f)); webView->setContentSize(Director::getInstance()->getVisibleSize()); webView->setJavascriptInterfaceScheme("cocos2dx"); webView->setOnJSCallback(CC_CALLBACK_2(BookCoverScene::callbackFromJS,this)); this->addChild(webView); #endif
the HTML file is part of the resources folder. The files worked fine on iOS Cocos 2d-x 2.x.
Any ideas?