gpt4 book ai didi

android - 构建嵌入了 CrossWalk 的应用程序

转载 作者:太空宇宙 更新时间:2023-11-03 11:25:08 26 4
gpt4 key购买 nike

我正在尝试使用 CrossWalk 构建浏览器作为依赖项。

但我一直收到关于 XWalkInternalResources 的异常:

W/dalvikvm( 3165): VFY: unable to resolve static field 4639 (cpu_arch_mismatch_message) in Lorg/xwalk/core/R$string;
D/dalvikvm( 3165): VFY: replacing opcode 0x60 at 0x001c
I/dalvikvm( 3165): DexOpt: unable to optimize static field ref 0x1220 at 0x2d in Lorg/xwalk/core/XWalkView;.init
I/dalvikvm( 3165): DexOpt: unable to optimize static field ref 0x1226 at 0x40 in Lorg/xwalk/core/XWalkView;.init
I/dalvikvm( 3165): DexOpt: unable to optimize static field ref 0x122e at 0x4b in Lorg/xwalk/core/XWalkView;.init
W/XWalkInternalResources( 3165): org.xwalk.core.R$styleis not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$stringis not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$menuis not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$layoutis not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$idis not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$drawableis not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$dimenis not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$attris not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$dimenis not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$coloris not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$styleis not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$drawableis not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$layoutis not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$idis not found.
W/XWalkInternalResources( 3165): org.xwalk.core.R$stringis not found.
I/LibraryLoader( 3165): Loading: xwalkcore
I/LibraryLoader( 3165): Time to load native libraries: 23 ms (timestamps 5556-5579)
I/LibraryLoader( 3165): Expected native library version number "",actual native library version number ""
I/LibraryLoader( 3165): Expected native library version number "",actual native library version number ""
I/chromium( 3165): [INFO:library_loader_hooks.cc(106)] Chromium logging enabled: level = 0, default verbosity = 0
D/dalvikvm( 3165): GC_CONCURRENT freed 244K, 6% free 4279K/4552K, paused 3ms+2ms, total 19ms
I/BrowserStartupController( 3165): Initializing chromium process, renderers=0
F/chromium( 3165): [FATAL:content_main_runner.cc(689)] Check failed: base::i18n::InitializeICU().
F/libc ( 3165): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 3165 (browser)

为我的浏览器制作文件:

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := DukaSharedLibrary\
DukaBrowserLibrary\
JsoupBrowserLibrary\
CrossWalkLibrary

LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_RESOURCE_DIR += $(LOCAL_PATH)/res
LOCAL_RESOURCE_DIR += vendor/duka/DukaSharedLibrary/res
LOCAL_RESOURCE_DIR += vendor/duka/DukaBrowserLibrary/res
LOCAL_RESOURCE_DIR += vendor/duka/CrossWalk/res

LOCAL_MANIFEST_FILE := AndroidManifest.xml
LOCAL_PACKAGE_NAME := DukaBrowser
LOCAL_CERTIFICATE := platform

LOCAL_ASSET_DIR := vendor/duka/DukaSharedLibrary/assets

LOCAL_AAPT_FLAGS := --auto-add-overlay

LOCAL_PROGUARD_ENABLED := disabled

include $(BUILD_PACKAGE)

include $(CLEAR_VARS)

LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := JsoupBrowserLibrary:libs/jsoup-1.7.3.jar
include $(BUILD_MULTI_PREBUILT)

为人行横道制作文件:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := CrossWalkLibrary
LOCAL_SDK_VERSION := 17

LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR += $(LOCAL_PATH)/res

LOCAL_STATIC_JAVA_LIBRARIES := XWalkLibrary

LOCAL_PROGUARD_ENABLED := disabled

include $(BUILD_STATIC_JAVA_LIBRARY)

include $(CLEAR_VARS)

LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := XWalkLibrary:libs/xwalk_core_library_java.jar

include $(BUILD_MULTI_PREBUILT)

这里有什么地方看起来很奇怪吗?我知道 crosswalk 项目中包含的 .jar 文件可以被浏览器项目找到,因为我之前已经解决了一个关于那个的错误。

我是否需要执行任何其他步骤来包含这些内部资源?

最佳答案

我在 Crosswalk 和 Android Studio 上遇到了同样的问题。原来是编译器在apk文件中没有包含资源目录。

您可以将 apk 文件的扩展名更改为 zip,并从 Crosswalk 中检查其资源是否存在于包中。

关于android - 构建嵌入了 CrossWalk 的应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26116625/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com