Android startActivity(意图)不起作用

Android startActivity(意图)不起作用,android,Android,我正在写一份申请书。我陷入了一个问题。我的问题是,当我调用startActivity(intent)时,它不工作,我的logcat显示 !!!活页夹事务失败 请帮我解决这个问题。 谢谢 我的代码是 listview3.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View view, int arg2, long arg3) {

我正在写一份申请书。我陷入了一个问题。我的问题是,当我调用
startActivity(intent)
时,它不工作,我的
logcat
显示

!!!活页夹事务失败

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

我的代码是

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);
}

});
listview3.setOnItemClickListener(新的OnItemClickListener()
{
public void onItemClick(AdapterView arg0、View视图、int arg2、,
长arg3)
{    
LinearLayout linear=(LinearLayout)view.findViewById(R.id.linearlist);
所选的\u section_id=webservice\u sectionid.get(arg2);
选中的\u section\u heading=webservice\u sectionheading.get(arg2);
所选的_section_no=webservice_section no.get(arg2);
String[]数组_sectionid=新字符串[webservice_sectionid.size()];
String[]数组_sectionheading=新字符串[webservice_sectionheading.size()];
String[]数组_sectionno=新字符串[webservice_sectionno.size()];
String noofpage=String.valueOf(webservice_sectionno.size());
意向=无效;
意图=新意图(Ruleservice1.this,SectionWebPage1.class);
intent.putExtra(“SectionId”,选中的部分id);
意向。额外(“章节标题”,选定章节标题);
intent.putExtra(“ActId”,selectedvalue\u id);
intent.putExtra(“SelectListPosition”,String.valueOf(arg2));
intent.putExtra(“ActId_g”,(ArrayList)webservice_global_ActId);
intent.putExtra(“ActHeading_g”,(ArrayList)webservice_global_ActHeading);
意向。额外(“第id1节”,选定的第id1节);
意向。额外(“章节号”,选定章节号);
意向。额外(“第1节”,选定的第1节);
intent.putExtra(“ActHeading”,selectedvalue\u heading);
intent.putExtra(“array\u sectionid”,(ArrayList)webservice\u sectionid);
intent.putExtra(“数组\ u节标题”,(ArrayList)Web服务\ u节标题);
intent.putExtra(“array\u sectionno”,(ArrayList)webservice\u sectionno);
intent.putExtra(“arrayActId”,(ArrayList)webservice\u actid);
intent.putExtra(“arrayActHeading”,(ArrayList)webservice_actheading);
意向。额外(“标志”、“0”);
intent.putExtra(“脱机状态”,脱机标志+”);
intent.putExtra(“count”,“Page”+String.valueOf(arg2+1)+“of”+webservice_sectionno.size());
意图。额外的(“起始页”,“规则”);
意向。额外(“noofpage”,noofpage);
intent.putExtra(“searchtext”,searchtext);
intent.putExtra(“隐藏文本”、“显示”);
intent.putExtra(“arrayActCatid”,selectedcatid);
星触觉(意向);
}
});
我的日志

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 !!!
10-10 13:02:23.453:D/dalvikvm(2527):GC_并发释放3009K,31%释放11791K/17031K,暂停2ms+3ms
10-10 13:02:23.563:D/dalvikvm(2527):所有释放4K的GC_,31%释放11790K/17031K,暂停26ms
10-10 13:02:23.573:I/dalvikvm堆(2527):为3738592字节分配将堆(frag案例)增长到15.275MB
10-10 13:02:23.643:D/dalvikvm(2527):GC_并发释放0公里,26%释放15441K/20743K,暂停2毫秒+3毫秒
10-10 13:02:23.663:D/dalvikvm(2527):释放4544K的所有物质的GC,48%的自由物质10898K/20743K,暂停27毫秒
10-10 13:02:23.673:I/dalvikvm堆(2527):为3738642字节分配将堆(frag大小写)增长到14.403MB
10-10 13:02:23.733:D/dalvikvm(2527):GC_FOR_ALLOC freed我刚刚发现了这个->

在这篇文章中,他们说这个错误是因为对大数据的依赖。 我不知道这是否是相同的原因,但如果您传递的数据较少,则尝试是否也会发生错误。 在我上面的链接中,他们写了1MB的限制


顺便说一句,很抱歉我的英语不好

两件事:
intent.putExtra(“searchtext”,searchtext)看起来错误,可能是复制粘贴错误

此外,请确保不要将大量数据放入意图中。字符串值和整数很好,但您似乎正在使用ArrayList传递应用程序数据,而不是通过这种方式将信息从一个活动传输到另一个活动。您应该将它们放在数据库中,只传输相关ID,或者将它们存储在某个缓存中,您可以从每个活动(如应用程序对象)中获取引用


同时检查Tim发布的链接。

尝试传递
JSON字符串
,并在调用的活动中转换它。看起来您的数据太大,无法放入意图中。您正在过度填充该意图。。。Jox@:我解决问题的方法是正确的,因为我必须通过其他活动发送数据。