在weex页面通过navigator.push 的方式跳转页面,uri地址正确;在android端报错;
求解
04-12 16:53:16.732 31900-31900/com.weex.sample E/Navigator: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW cat=[com.taobao.android.intent.category.WEEX] dat=http://192.168.2.31:8080/dist... (has extras) }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1846)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1566)
at android.app.Activity.startActivityForResult(Activity.java:3830)
at android.app.Activity.startActivityForResult(Activity.java:3787)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:842)
at android.app.Activity.startActivity(Activity.java:4139)
at android.app.Activity.startActivity(Activity.java:4069)
at com.taobao.weex.appfram.navigator.WXNavigatorModule.push(WXNavigatorModule.java:224)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.taobao.weex.bridge.MethodInvoker.invoke(MethodInvoker.java:232)
at com.taobao.weex.bridge.NativeInvokeHelper$1.run(NativeInvokeHelper.java:234)
at com.taobao.weex.common.WXThread$SafeRunnable.run(WXThread.java:234)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5869)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1019)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:814)
PHP中文网2017-04-18 09:21:06
navigator.push switches instances through startActivity at the bottom of Android. This error is because there is no interceptor configured in AndroidManifest.xml
, you can try this:
<activity
android:name="com.bingo.weex.core.BingoWXPageActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="com.taobao.android.intent.action.WEEX" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="com.taobao.android.intent.category.WEEX" />
<action android:name="android.intent.action.VIEW" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:scheme="file" />
<data android:scheme="wxpage" />
</intent-filter>
</activity>
Pay attentionandroid:name
修改成自己的Activity即可,观察下action
和category
I guess you’ll understand