Fragment newfragment =new MyFragment();fragmentTransaction.replace(R.layout.activity_main,newfragment ).commit(); 提示错误:The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, MyFragment) 妈蛋,找了好久!一直以…
The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable for the arguments (int, SettingFragment, String) 引发错误的原因是因为import包的时候Fragment是引用的V4的,而activity继承Activity.而getFragmentManager()是activity中的方法但是getSupportFragmen…
提示错误:The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, MyFragment) getFragmentManager().beginTransaction()                 .replace(R.id.container, new User()).commit(); Fragment Activity导入的库不…
引入别人的项目发现利用HibernateTemplate的load的方法报错了.错误提示为: The method load(Class, Serializable) in the type HibernateTemplate is not applicable for the arguments (Class, int) 意思为load方法的第二个参数是实现Serializable接口的对象,int类型不符合.但jdk自动装箱,int会自转换为Integer,而Integer是实现了Seria…
今天,我弟遇到一个有意思的错误~ 程序: package com.mq.ceshi1; public class StringFormat { public static void main(String[] args) { int num = 10; int num2 = 5; System.out.println(String.format("%d / %d = %d", num,num2,num / num2)); }} 报了The method format(String, O…
在当前短信内容的activity中写            Bundle bun = new Bundle();         bun.putString("message", "短信内容");         Intent in = new Intent(第二个Activity.this, 第一个Activity.class);         in.putExtras(bun); 在要传内容的activity中写:            Bundle bu =…
开始学习 android 了,学习的是高明鑫老师的android视频教程(android视频教学). 学到第八讲时, 在写动态设置时报错: The method setOnClickListener(View.OnClickListener) in the  type View is not applicable for the arguments (new OnClickListener(){}) 解决方法: 增加一个导入 import android.view.View.OnClickLis…
package comxunfang.button; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.Toast; public class MainActi…
1. 问题 看到这个错误以为是貌似jsp页面有误,c:forTokens标签用错了?? An error occurred at line: in the jsp file: /WEB-INF/pages/countOrder/viewCountOrderDetails.jsp The method setItems(String) in the type ForTokensTag is not applicable for the arguments (Object) : </tr> : &…
原因:本该导入import org.apache.log4j.Logger; 结果成了import java.util.logging.Logger; 如果硬把private static Logger logger = Logger.getLogger(InsertPersons.class); 修改成private static Logger logger = Logger.getLogger("XXX"); 控制台输出还可能变成红色字,即使是正常的输出信息. 要解决它把包删了重新…