[
https://issues.apache.org/jira/browse/WEEX-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16521868#comment-16521868
]
华逢义 commented on WEEX-470:
--------------------------
Hi,Hanks Zhang,英文不好抱歉,还是用中文解释下吧
1.Activity A和 Activity B。在程序里的名字都是ContainerActivity,只不过是两个实例而已。A调用B是又启动了自身一次。
2.在js代码中,我定义了一个全局的变量,叫$xx
3.在$xx中,我定义了一个函数。
$xx.alert = function(abc)
{ var modal = weex.requireModule("modal") modal.alert(abc) }
4.A进入B,B回到A后,立马执行$xx.alert,会提示:
{color:#FF0000}D/jsLog: [JS Framework] Failed to requireModule("stream"),
instance (1) doesn't exist anymore.__ERROR{color}
5.这时候instance(1) doesn't exist anymore.这个1指的是B,但是我现在已经关闭B了,在A中,所以一头雾水。。。
A的id是0,B的id是1
> module lost after switch from on Activity to previous Activity
> --------------------------------------------------------------
>
> Key: WEEX-470
> URL: https://issues.apache.org/jira/browse/WEEX-470
> Project: Weex
> Issue Type: Bug
> Components: Android
> Affects Versions: 0.19
> Reporter: 华逢义
> Assignee: codefurture
> Priority: Blocker
>
> Activity A started Activity B.
> B finished and back to A
> After this operation.weex.requireModule(xxx) does not work in Activity A
> the error is as follow:
> {color:#FF0000}D/jsLog: [JS Framework] Failed to requireModule("stream"),
> instance (4) doesn't exist anymore.__ERROR{color}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)