2

我正在开发一个应用程序。我陷入了一个问题。我的问题是,当我打电话时startActivity(intent),它不起作用,我的logcat节目

!!!Binder 交易失败!!!

请帮我解决这个问题。谢谢

我的代码是

listview3.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView<?> arg0, View view, int arg2,
long arg3) 
{    



LinearLayout linear = (LinearLayout)view.findViewById(R.id.linearlist);
selected_section_id=webservice_sectionid.get(arg2);
                      selected_section_heading=webservice_sectionheading.get(arg2);
selected_section_no=webservice_sectionno.get(arg2);

String[] array_sectionid = new String[webservice_sectionid.size()];
                String[] array_sectionheading = new  String[webservice_sectionheading.size()];
String[] array_sectionno = new String[webservice_sectionno.size()];
String noofpage=String.valueOf(webservice_sectionno.size());
Intent intent = null;

intent=new Intent(Ruleservice1.this,SectionWebPage1.class);
intent.putExtra("SectionId", selected_section_id);
intent.putExtra("SectionHeading", selected_section_heading);
intent.putExtra("ActId", selectedvalue_id);
intent.putExtra("SelectListPosition", String.valueOf(arg2)); 
intent.putExtra("ActId_g", (ArrayList<String>) webservice_global_actid); 
intent.putExtra("ActHeading_g", (ArrayList<String>) webservice_global_actheading);   
intent.putExtra("SectionId1", selected_section_id1);
intent.putExtra("SectionNo", selected_section_no);
intent.putExtra("SectionNo1", selected_section_no1);
intent.putExtra("ActHeading", selectedvalue_heading);
intent.putExtra("array_sectionid", (ArrayList<String>) webservice_sectionid);
intent.putExtra("array_sectionheading", (ArrayList<String>) webservice_sectionheading);
intent.putExtra("array_sectionno", (ArrayList<String>) webservice_sectionno);
intent.putExtra("arrayActId", (ArrayList<String>)webservice_actid);
intent.putExtra("arrayActHeading", (ArrayList<String>)webservice_actheading);
intent.putExtra("flag", "0");
intent.putExtra("offlineStatus", offlineflag+"");
intent.putExtra("count", "Page "+String.valueOf(arg2+1)+" of "+  webservice_sectionno.size());
intent.putExtra("fromwhichpage", "rule");
intent.putExtra("noofpage", noofpage);
intent.putExtra("searchtext", SearchText);
intent.putExtra("hideshowtext", "Show");
intent.putExtra("arrayActCatid", selectedcatid);
startActivity(intent);
}

});

我的日志猫

10-10 13:02:23.453: D/dalvikvm(2527): GC_CONCURRENT freed 3009K, 31% free 11791K/17031K, paused 2ms+3ms
10-10 13:02:23.563: D/dalvikvm(2527): GC_FOR_ALLOC freed 4K, 31% free 11790K/17031K, paused 26ms
10-10 13:02:23.573: I/dalvikvm-heap(2527): Grow heap (frag case) to 15.275MB for 3738592-byte allocation
10-10 13:02:23.643: D/dalvikvm(2527): GC_CONCURRENT freed 0K, 26% free 15441K/20743K, paused 2ms+3ms
10-10 13:02:23.663: D/dalvikvm(2527): GC_FOR_ALLOC freed 4544K, 48% free 10898K/20743K, paused 27ms
10-10 13:02:23.673: I/dalvikvm-heap(2527): Grow heap (frag case) to 14.403MB for 3738642-byte allocation
10-10 13:02:23.733: D/dalvikvm(2527): GC_FOR_ALLOC freed <1K, 30% free 14548K/20743K, paused 26ms
10-10 13:02:23.743: I/dalvikvm-heap(2527): Grow heap (frag case) to 19.751MB for 5607958-byte allocation
10-10 13:02:23.803: D/dalvikvm(2527): GC_CONCURRENT freed 3651K, 38% free 16374K/26247K, paused 1ms+4ms
10-10 13:02:23.833: D/dalvikvm(2527): GC_FOR_ALLOC freed 0K, 38% free 16374K/26247K, paused 29ms
10-10 13:02:23.843: I/dalvikvm-heap(2527): Grow heap (frag case) to 19.751MB for 3738646-byte allocation
10-10 13:02:23.903: D/dalvikvm(2527): GC_FOR_ALLOC freed <1K, 24% free 20025K/26247K, paused 28ms
10-10 13:02:23.913: I/dalvikvm-heap(2527): Grow heap (frag case) to 23.317MB for 3738700-byte allocation
10-10 13:02:23.973: D/dalvikvm(2527): GC_CONCURRENT freed 5476K, 40% free 18199K/29959K, paused 2ms+4ms
10-10 13:02:24.013: D/dalvikvm(2527): GC_FOR_ALLOC freed 3651K, 52% free 14548K/29959K, paused 31ms
10-10 13:02:24.023: I/dalvikvm-heap(2527): Grow heap (frag case) to 19.751MB for 5608046-byte allocation
10-10 13:02:24.093: D/dalvikvm(2527): GC_FOR_ALLOC freed 3651K, 54% free 16374K/35463K, paused 30ms
10-10 13:02:24.123: D/dalvikvm(2527): GC_FOR_ALLOC freed 0K, 54% free 16374K/35463K, paused 32ms
10-10 13:02:24.133: I/dalvikvm-heap(2527): Grow heap (frag case) to 19.751MB for 3738702-byte allocation
10-10 13:02:24.203: D/dalvikvm(2527): GC_CONCURRENT freed 129K, 44% free 19896K/35463K, paused 2ms+4ms
10-10 13:02:24.503: D/dalvikvm(2527): GC_CONCURRENT freed 5969K, 56% free 15957K/35463K, paused 2ms+5ms
10-10 13:02:24.803: D/dalvikvm(2527): GC_CONCURRENT freed 507K, 51% free 17497K/35463K, paused 2ms+5ms
10-10 13:02:25.143: D/dalvikvm(2527): GC_CONCURRENT freed 476K, 47% free 19115K/35463K, paused 3ms+6ms
10-10 13:02:25.473: D/dalvikvm(2527): GC_CONCURRENT freed 508K, 42% free 20684K/35463K, paused 2ms+6ms
10-10 13:02:25.813: D/dalvikvm(2527): GC_CONCURRENT freed 476K, 38% free 22256K/35463K, paused 2ms+6ms
10-10 13:02:26.163: D/dalvikvm(2527): GC_CONCURRENT freed 501K, 33% free 23796K/35463K, paused 2ms+6ms
10-10 13:02:26.553: D/dalvikvm(2527): GC_CONCURRENT freed 915K, 30% free 24981K/35463K, paused 2ms+7ms
10-10 13:02:28.643: E/JavaBinder(2527): !!! FAILED BINDER TRANSACTION !!!
4

2 回答 2

4

两件事:intent.putExtra("searchtext", SearchText);看起来不对,可能是复制粘贴错误?

此外,请确保不要将大量数据放入 Intent。字符串值和整数很好,但您似乎正在使用 ArrayLists 传递应用程序数据,这不是您将信息从一个 Activity 传输到另一个 Activity 的方式。您应该将它们放在数据库中并且只传输相关的 id 或将它们存储在某个缓存中,您可以从每个活动(如应用程序对象)中引用这些缓存。

还要检查蒂姆发布的链接。

于 2013-10-10T07:46:03.320 回答
1

我刚刚发现这个->将位图动态放入小部件时失败的活页夹事务

在这篇文章中,他们说这个错误是由于大数据造成的。我不知道这是否会是同样的原因,但如果您有意传递较少的数据,请尝试是否也会发生错误。在我上面的链接中,他们写了大约 1 MB 的限制。

顺便说一句,对不起我的英语不好。=)

于 2013-10-10T07:43:48.960 回答