- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试使用以下代码打开一个 webview in react native:
render() {
console.log("URL in webview:" +this.props.navigation.state.params.url);
return <WebView source={{ uri: this.props.navigation.state.params.url }} />;
}
但是当我尝试打开一个 URL 时,它给出:
Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/TracingController; at java.lang.Class java.lang.Class.classForName!(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2) at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:400) at java.lang.Class android.webkit.WebViewFactory.getProviderClass() (WebViewFactory.java:349) at android.webkit.WebViewFactoryProvider android.webkit.WebViewFactory.getProvider() (WebViewFactory.java:194) at android.webkit.WebViewFactoryProvider android.webkit.WebView.getFactory() (WebView.java:2331) at void android.webkit.WebView.ensureProviderCreated() (WebView.java:2326) at void android.webkit.WebView.setOverScrollMode(int) (WebView.java:2385) at void android.view.View.(android.content.Context) (View.java:4007) at void android.view.View.(android.content.Context, android.util.AttributeSet, int, int) (View.java:4126) at void android.view.ViewGroup.(android.content.Context, android.util.AttributeSet, int, int) (ViewGroup.java:578) at void android.widget.AbsoluteLayout.(android.content.Context, android.util.AttributeSet, int, int) (AbsoluteLayout.java:55) at void android.webkit.WebView.(android.content.Context, android.util.AttributeSet, int, int, java.util.Map, boolean) (WebView.java:627) at void android.webkit.WebView.(android.content.Context, android.util.AttributeSet, int, int) (WebView.java:572) at void android.webkit.WebView.(android.content.Context, android.util.AttributeSet, int) (WebView.java:555) at void android.webkit.WebView.(android.content.Context, android.util.AttributeSet) (WebView.java:542) at void android.webkit.WebView.(android.content.Context) (WebView.java:532) at void com.facebook.react.views.webview.ReactWebViewManager$ReactWebView.(com.facebook.react.uimanager.ThemedReactContext) (ReactWebViewManager.java:248) at com.facebook.react.views.webview.ReactWebViewManager$ReactWebView com.facebook.react.views.webview.ReactWebViewManager.createReactWebViewInstance(com.facebook.react.uimanager.ThemedReactContext) (ReactWebViewManager.java:357) at android.webkit.WebView com.facebook.react.views.webview.ReactWebViewManager.createViewInstance(com.facebook.react.uimanager.ThemedReactContext) (ReactWebViewManager.java:362) at android.view.View com.facebook.react.views.webview.ReactWebViewManager.createViewInstance(com.facebook.react.uimanager.ThemedReactContext) (ReactWebViewManager.java:86) at android.view.View com.facebook.react.uimanager.ViewManager.createView(com.facebook.react.uimanager.ThemedReactContext, com.facebook.react.touch.JSResponderHandler) (ViewManager.java:44) at void com.facebook.react.uimanager.NativeViewHierarchyManager.createView(com.facebook.react.uimanager.ThemedReactContext, int, java.lang.String, com.facebook.react.uimanager.ReactStylesDiffMap) (NativeViewHierarchyManager.java:224) at void com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute() (UIViewOperationQueue.java:153) at void com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(long) (UIViewOperationQueue.java:1006) at void com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(long) (UIViewOperationQueue.java:977) at void com.facebook.react.uimanager.GuardedFrameCallback.doFrame(long) (GuardedFrameCallback.java:31) at void com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(long) (ReactChoreographer.java:136) at void com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(long) (ChoreographerCompat.java:107) at void android.view.Choreographer$CallbackRecord.run(long) (Choreographer.java:871) at void android.view.Choreographer.doCallbacks(int, long) (Choreographer.java:685) at void android.view.Choreographer.doFrame(long, int) (Choreographer.java:618) at void android.view.Choreographer$FrameDisplayEventReceiver.run() (Choreographer.java:859) at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:754) at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:95) at void android.os.Looper.loop() (Looper.java:165) at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6365) at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2) at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:883) at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:773)Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.TracingController" on path: DexPathList[[zip file "/data/app/com.android.chrome-2/base.apk"],nativeLibraryDirectories=[/data/app/com.android.chrome-2/lib/arm, /data/app/com.android.chrome-2/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]] ...
The code works with API level 28, but throw above error in API level 24. I searched that the class TracingController was introduced in API level 28, and i am trying to open webview in API 24, but i dont know how i can i configure it to open in API level 24.
My build.gradle file:
defaultConfig {
minSdkVersion 21
targetSdkVersion com.amazon.brazil.android.SDK.platformVersion.toInteger()
关于如何打开 WebView 的任何提示,或者我如何在 API 级别 24 中打开 Webview?如果我在 API 级别 24 上运行,为什么它会尝试访问 API 级别 28 中引入的文件?
最佳答案
您可能会在 this particular SO answer 中看到同样的问题.
基本上,according to Google ,它是在 O+ 的 WebView 更改中引入的,并触发此消息在 <=N 设备上的 WebView 代码中不正确地记录。这不是实际错误,因此您可以忽略它。
我在我的 webview 代码中为 TracingController 获得了完全相同的 NCDFE,并且可以确认它没有不良影响。不幸的是,它会向日志消息发送垃圾邮件,所以希望他们能尽快修复它。
关于android - 在 react-native 中打开 webview 时出现 ClassNotFoundException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52956327/
我的应用在尝试访问外部依赖项时遇到 NoClassDefFoundError,但仅限于作为 jar 运行时。 使用 Intellij,我有一个带有主类的简单应用程序,其中包含一些对外部依赖项(例如 s
我收到以下异常: java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.ResteasyBootstr
我正在尝试使用eclipse和tomcat调试solr4.6源代码。我收到错误消息:HTTP 状态 500 - {msg=SolrCore 'collection1' 由于初始化失败而不可用:[sch
我是新来的,很抱歉我的英语不好;)。 我尝试使用以下代码在 java 中加载插件 jar: package testprogramm; import java.io.File; import java
我重新安装了 ADT Bundle,因为我在更新 eclipse 后遇到了一些问题。 现在,当我想测试我的应用程序时,出现以下异常: 06-05 10:33:35.770: E/AndroidRunt
我浏览过现有的帖子,这些帖子处理在 Eclipse 中的 Tomcat 下运行 Java Web 应用程序的 ClassNotFoundException。 我无法提供源代码和配置 Artifact
我忙于我的应用一个多星期,突然: 11-12 07:59:17.860 1653-1653/nl.test.myapp E/AndroidRuntime﹕ FATAL EXCEPTION: ma
我的应用程序有问题,昨天一切正常,但今天我更新了 sdk,现在当我尝试运行我的应用程序时,出现这样的错误 05-21 00:14:19.285: W/dalvikvm(7061): Unable t
我正在阅读 JPA docs在 Spring ,我正在尝试重组我的代码。 我现在所拥有的: BrewerRepository @Repository public class BrewerReposi
我想像 BalusC's example 一样实现 fileUpload . 不幸的是,我已经在努力声明 servlet。 Extensions Filter javax.faces
在某些机器上运行这个小程序不起作用,但在其他机器上它工作得很好。在所有情况下看起来都安装了 JRE 1.6.0_26。 var attributes = {codebase:'http://kas
我将跟随这个非常简单的教程(http://www.tutorialspoint.com/hadoop/hadoop_mapreduce.htm)一起学习,直到我尝试运行Java文件为止,一切运行良好。
我看到了帖子,并按照流程进行了操作。但这没有用。 ClassNotFoundException, while running example job of Hadoop 请帮助我。 创建的 mapre
我尝试在cloudera quickstart vm上为hadoop运行Mahout Kmeans示例。我在这里读link to clouudera block和这里stack overflow po
我有一个mapreduce程序,其中我使用Hcatalog从Hive表'A'中获取带有HcatInputFormat的详细信息,对其进行处理,然后使用HcatOutput格式将其写回到Hive表'B'
我是激发应用程序编程的新手,因此在这里为这个基本的编程而苦苦挣扎。 我有 scala ide 并附加了来自最新 hadoop 和 spark 发行版的相关 jar 文件。我正在使用的只有一个基本的 s
我正在尝试在本地模式下运行Spark示例,但是正在获取以下堆栈跟踪: Exception in thread "main" java.lang.NoClassDefFoundError: org/ap
我有以下代码: // Test TODO remove try { System.out.println(System.getProperties().getPrope
我有以下文件: src/my_proj/myns.clj: (ns my-proj.myns) (defrecord MyRecord [a b c]) 测试/my_proj/myns_test.c
我试图让应用程序动态加载某些类,然后调用启动方法,但问题是,由于 ClassLoader 不同,一个类无法调用另一个类的方法,但是正如我已经用 google 搜索的那样,我用父类创建了两个类加载器。这
我是一名优秀的程序员,十分优秀!