调试以下代码我收到的“未找到”通知,这可能意味着某些变量未设置:

btnEdit.setOnClickListener(new View.OnClickListener(){

        @Override
        public void onClick(View v) {
            Intent intent = new Intent(v.getContext(), DlgTitleTags.class);
            intent.putExtra(Client.STORED_TITLE, mTitle);
            intent.putExtra(Client.STORED_TAGS, mTags);
            startActivityForResult(intent, SHOW_SUBACTIVITY_TITLE_TAGS);

        }

    });

这里的意图是成功创建的,也设置了所有其他变量,因此我仍在尝试弄清楚原因是什么原因。

我注意到日志消息:

07-28 13:29:09.642: DEBUG/dalvikvm(56): GC freed 2010 objects / 86744 bytes in 230ms
07-28 13:29:14.861: WARN/WindowManager(56): Key dispatching timed out sending to dev.client.android/dev.client.android.DlgEditFile
07-28 13:29:14.862: WARN/WindowManager(56): Dispatch state: {{KeyEvent{action=1 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to Window{43377460 dev.client.android/dev.client.android.DlgEditFile paused=false} @ 1248780547618 lw=Window{43377460 dev.client.android/dev.client.android.DlgEditFile paused=false} lb=android.os.BinderProxy@43449e78 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{43377460 dev.client.android/dev.client.android.DlgEditFile paused=false}}}
07-28 13:29:14.862: WARN/WindowManager(56): Current state:  {{null to Window{43377460 dev.client.android/dev.client.android.DlgEditFile paused=false} @ 1248780554868 lw=Window{43377460 dev.client.android/dev.client.android.DlgEditFile paused=false} lb=android.os.BinderProxy@43449e78 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{43377460 dev.client.android/dev.client.android.DlgEditFile paused=false}}}
07-28 13:29:14.872: WARN/WindowManager(56): Continuing to wait for key to be dispatched
07-28 13:29:15.212: INFO/ActivityManager(56): Starting activity: Intent { comp={dev.client.android/dev.client.android.DlgTitleTags} (has extras) }
07-28 13:29:15.522: WARN/ResourceType(1647): Failure getting entry for 0x7f030005 (t=2 e=5) in package 0: 0xffffffb5

我真的很感谢您解决问题的任何帮助。

有帮助吗?

解决方案

清单中最有可能的活动dlgtitletags并未定义。

其他提示

  1. 打开 androidManifest.xml
  2. 在底部添加另一个 活动
  3. 添加后,单击活动,除了右侧 姓名
  4. 单击浏览,然后选择其他类文件(.java文件)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top