That call to setValue() isn't the problem.It's trying to inflate the XWalkView
from XML (it's in your layout) and the constructor is failing.
I had this happen too because the constructor was casting to Activity from
Context (/facepalm).
However, in your case - could it be that you have proguard running ?Try
disabling proguard and see what happens.
If that doesn't work then maybe it's crashing here for you (highlighted)
public XWalkViewInternal(Context context, AttributeSet attrs) {
super(convertContext(context), attrs);
checkThreadSafety();
mActivity = (Activity) context;
mContext = getContext();
init(mContext, attrs);
}I solved it by programmatically instantiating XWalkView and inserting it into
an empty RelativeLayout placeholder defined in the XML (with ID R.id.container)
mViewContainer = (RelativeLayout) mLayoutView.findViewById(R.id.container);
mWebView = new XWalkView(mParentActivity, mParentActivity);
RelativeLayout.LayoutParams relativeParams = new
RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT);
mViewContainer.addView(mWebView, relativeParams);I hope it helps,AlexDate: Wed,
27 May 2015 01:07:48 +0200
From: [email protected]
To: [email protected]
Subject: [Crosswalk-help] Crosswalk webview crashes on startup
Hi, just made my first android app with crosswalk webview embeded in
android studio, unfortunatly the app craches on startup on android
4.4
Saw somewhere it could be because I left
XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);
???
Could it be the problem ?
Here is the reports on google play :
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.cardboard360images.parisvr/com.cardboard360images.parisvr.MainActivity}:
android.view.InflateException: Binary XML file line #9: Error
inflating class org.xwalk.core.XWalkView
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2305)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2363)
at android.app.ActivityThread.access$900(ActivityThread.java:161)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1265)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5356)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #9:
Error inflating class org.xwalk.core.XWalkView
at android.view.LayoutInflater.createView(LayoutInflater.java:626)
at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:702)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:761)
at android.view.LayoutInflater.inflate(LayoutInflater.java:498)
at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:359)
at android.app.Activity.setContentView(Activity.java:2010)
at com.cardboard360images.parisvr.MainActivity.onCreate(Unknown
Source)
at android.app.Activity.performCreate(Activity.java:5426)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2269)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at android.view.LayoutInflater.createView(LayoutInflater.java:600)
... 22 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
Use SharedXWalkView if you want to support shared mode
at org.xwalk.core.a.a(Unknown Source)
at org.xwalk.core.a.b(Unknown Source)
at org.xwalk.core.a.b(Unknown Source)
at org.xwalk.core.a.a(Unknown Source)
at org.xwalk.core.b.a(Unknown Source)
at org.xwalk.core.a.a(Unknown Source)
at org.xwalk.core.XWalkView.<init>(Unknown Source)
... 25 more
Caused by: java.lang.RuntimeException: Use SharedXWalkView if you
want to support shared mode
... 31 more
--
And here is the app :
https://play.google.com/store/apps/details?id=com.cardboard360images.parisvr
Thanx a lot for your help !
--
Document sans nom
Jerome Boccon-Gibod
[email protected]
06.62.66.74.75
www.360images.fr
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help