4

I'm trying to build a browser with CrossWalk as a dependency.

But I keep getting an exception regarding 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)

Make file for my 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)

Make file for CrossWalk:

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)

Does anything look odd here? I know that the .jar file included in the crosswalk project can be found by the browser project, since I've got rid of an error regarding that earlier on.

Do I need to do any additional steps to include these internal resources?

dthomasen
  • 826
  • 15
  • 32

3 Answers3

0

I had the same problem on Crosswalk and Android Studio. It turned out that the compiler does not include a resources directory in apk file.

You can change extension of apk file to zip and check its resources from Crosswalk exists in package.

Karbon001
  • 21
  • 2
  • It's already included in the makefile. I can build no problems using intellij and Android studio, the problem occurs when I'm building my Android build from source including the crosswalk application – dthomasen Oct 10 '14 at 05:55
0

10 months ago...Did u forget to close it?

I guess u should import xwalk_core_library and add it to framework.(Just fix it :) )

List:

modules:

app
framework
core_xwalk_library

and dependencies

app:

framework

framework:

core_xwalk_library

Now studio can get your jars...

YaaMe
  • 1
  • 1
  • It still isn't studio that's the problem.. It's the build server building AOSP from source that's the issue. But we didn't use it because of this. – dthomasen Aug 12 '15 at 08:16
-1

go to Crosswalk Download Page and download stable version of "Android webview (ARM)". Extract the files to C:\ and begin with step 3 of this documentation: Documentation at Github

I also had some problems, but that worked for me. First i extracted the files to another path, that was too long, so i had a lot of issues. In "C:\crosswalk-webview-8.37.189.12-arm" it worked.

Jonson
  • 171
  • 2
  • 6