You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2020/01/20 02:59:46 UTC

[GitHub] [incubator-weex] WZY90 opened a new issue #3123: [Android]标签跳转页面时报空指针异常

WZY90 opened a new issue #3123: [Android]<a>标签跳转页面时报空指针异常
URL: https://github.com/apache/incubator-weex/issues/3123
 
 
   <!--
   Thanks for using Weex. Github Issue is only used for bur report and please follow the template to report the bug. 
   A good bug report should include the following information:
   -->
   
   <!-- Requirements: please go through this checklist before opening a new issue
     - * Review the documentation: https://weex.apache.org/index.html
     - * Search for existing issues: https://github.com/apache/incubator-weex/issues
     - * Use the latest Weex release: https://github.com/apache/incubator-weex/releases -->
   
   
   ## Describe the bug
   使用<a>标签页面跳转时报空指针异常,堆栈如下
   java.lang.NullPointerException: Attempt to read from field 'org.apache.weex.bridge.ModuleFactory org.apache.weex.bridge.ModuleFactoryImpl.mFactory' on a null object reference
           at org.apache.weex.bridge.WXModuleManager.callModuleMethod(WXModuleManager.java:206)
           at org.apache.weex.bridge.WXBridgeManager.callModuleMethod(WXBridgeManager.java:507)
           at org.apache.weex.bridge.WXBridgeManager.callModuleMethod(WXBridgeManager.java:478)
           at org.apache.weex.utils.ATagUtil.onClick(ATagUtil.java:40)
           at org.apache.weex.ui.component.WXA$1.onHostViewClick(WXA.java:49)
           at org.apache.weex.ui.component.WXComponent$4.onClick(WXComponent.java:644)
           at android.view.View.performClick(View.java:6627)
           at android.view.View.performClickInternal(View.java:6604)
           at android.view.View.access$3100(View.java:785)
           at android.view.View$PerformClick.run(View.java:26126)
           at android.os.Handler.handleCallback(Handler.java:873)
           at android.os.Handler.dispatchMessage(Handler.java:99)
           at android.os.Looper.loop(Looper.java:224)
           at android.app.ActivityThread.main(ActivityThread.java:7053)
           at java.lang.reflect.Method.invoke(Native Method)
           at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:536)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:876)
   
   ## To Reproduce
   <!-- Steps to reproduce the behavior.  Include a MCVE using http://dotwe.org/vue , crash stacktrace or  share your app project. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve -->
   代码如下
   `<a class="button" href="http://xxx/weex/components\ArticleEvaluation\ArticleEvaluation.js?bundleType=vue?_wx_tpl=http://xxx/weex/components\ArticleEvaluation\ArticleEvaluation.js?bundleType=vue">
         <text class="text">去晒单详情页</text>
       </a>`
   
   ## Environment
   * Device: [vivo iqoo]
   * OS: [Android 9.0 ,PD1809_A_6.23.5]
   * Version [weexsdk version 0.28.0]
   * Build from source [no] 
   
   ## Expected behavior
   <!-- A clear and concise description of what you expected to happen. -->
   
   ## Screenshots
   <!-- If applicable, add screenshots to help explain your problem. -->
   
   ## Additional context
   <!-- Add any other context about the problem here.-->
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] Ryan-Shz commented on issue #3123: [Android]标签跳转页面时报空指针异常

Posted by GitBox <gi...@apache.org>.
Ryan-Shz commented on issue #3123: [Android]<a>标签跳转页面时报空指针异常
URL: https://github.com/apache/incubator-weex/issues/3123#issuecomment-599975820
 
 
   a标签的跳转需要实现key为"event"的自定义module,实现openURL

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] Ryan-Shz removed a comment on issue #3123: [Android]标签跳转页面时报空指针异常

Posted by GitBox <gi...@apache.org>.
Ryan-Shz removed a comment on issue #3123: [Android]<a>标签跳转页面时报空指针异常
URL: https://github.com/apache/incubator-weex/issues/3123#issuecomment-599963229
 
 
   我也遇到了 这个问题有什么办法解吗?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] cnryb commented on issue #3123: [Android]标签跳转页面时报空指针异常

Posted by GitBox <gi...@apache.org>.
cnryb commented on issue #3123: [Android]<a>标签跳转页面时报空指针异常
URL: https://github.com/apache/incubator-weex/issues/3123#issuecomment-599995732
 
 
   @WZY90 在安卓上建议按照 @Ryan-Shz 的说法尝试。
   
   @Ryan-Shz 从源码上看,安卓里是你说的样子。iOS的实现行为和安卓不同,建议实测。
   或许我们应该新起一个issue,用来讨论行为不一致的问题。
   
   安卓
   https://github.com/apache/incubator-weex/blob/master/android/sdk/src/main/java/org/apache/weex/ui/component/WXA.java#L49
   https://github.com/apache/incubator-weex/blob/master/android/sdk/src/main/java/org/apache/weex/utils/ATagUtil.java#L40
   
   iOS
   https://github.com/apache/incubator-weex/blob/master/ios/sdk/WeexSDK/Sources/Component/WXAComponent.m

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] Ryan-Shz removed a comment on issue #3123: [Android]标签跳转页面时报空指针异常

Posted by GitBox <gi...@apache.org>.
Ryan-Shz removed a comment on issue #3123: [Android]<a>标签跳转页面时报空指针异常
URL: https://github.com/apache/incubator-weex/issues/3123#issuecomment-599975820
 
 
   a标签的跳转需要实现key为"event"的自定义module,实现openURL

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] Ryan-Shz commented on issue #3123: [Android]标签跳转页面时报空指针异常

Posted by GitBox <gi...@apache.org>.
Ryan-Shz commented on issue #3123: [Android]<a>标签跳转页面时报空指针异常
URL: https://github.com/apache/incubator-weex/issues/3123#issuecomment-599975960
 
 
   a标签的跳转需要实现key为"event"的自定义module,并实现openURL

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-weex] Ryan-Shz commented on issue #3123: [Android]标签跳转页面时报空指针异常

Posted by GitBox <gi...@apache.org>.
Ryan-Shz commented on issue #3123: [Android]<a>标签跳转页面时报空指针异常
URL: https://github.com/apache/incubator-weex/issues/3123#issuecomment-599963229
 
 
   我也遇到了 这个问题有什么办法解吗?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services