android The method getText() is undefined for the type R.string

2024-05-13 20:59

1. android The method getText() is undefined for the type R.string

我出现的问题是The method getText() is undefined for the type String 不知道和你的是不是一样。我出错的原因是声明编辑文本的变量和声明Strng的变量一样了。把变量名换了就对了

android The method getText() is undefined for the type R.string

2. 【java/eclipse】爆了一串这个错误:the method ,,,is undifined for the type. 是什么原因 怎么改

你调用的方法是不是在类中没有定义

3. jsp出现The method getTextContent() is undefined for the type Element的报错

没遇到过,不上源码不好帮你试..

jsp出现The method getTextContent() is undefined for the type Element的报错

4. 用Eclipse与与运行Java程序出现错误The method pow(int, int) is undefined for the type Math,求答案

你使用的这个pow 是自定义的吗?如果是的话,你需要将这个方法发出来。
或者改作pow(2d,12d)试试?

5. eclipse开发android报the method method() is undefined

【错误信息】
[2011-01-19 16:39:10 - ApiDemos] WARNING: Application does not specify an API level requirement!
[2011-01-19 16:39:10 - ApiDemos] Device API version is 8 (Android 2.2)
原因:
不影响正常运行。在AndroidManifest.xml文件中没有加API的版本号,在  之间加
[2011-01-19 16:55:04 - ApiDemos] Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
[2011-01-19 16:55:04 - ApiDemos] Please check logcat output for more details.
[2011-01-19 16:55:05 - ApiDemos] Launch canceled!
该设备没有足够的存储空间来安装应用程序,
 

【错误信息】
[2011-02-18 11:46:53] Failed to push selection: Is a directory
原因:
原先目录已经有pkg_3.apk的文件夹,再copy一个pkg_3.apk安装文件时出现问题,解决办法,先删除掉pkg_3.apk的文件夹
[2011-03-04 09:25:12 - ActivityMain]: Dx
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lorg1/apache/commons/codec/net/RFC1522Codec;
[2011-03-04 09:25:12 - ActivityMain]: Dx at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
[2011-03-04 09:25:12 - ActivityMain]: Dx at com.android.dx.dex.file.DexFile.add(DexFile.java:143)
.....
[2011-03-04 09:25:12 - ActivityMain]: Dx1 error; aborting
[2011-03-04 09:25:12 - ActivityMain] Conversion to Dalvik format failed with error 1
原因:
 

【错误信息】
启动Eclipse时出现:
 this android sdk requires android developer toolkit version 10.0.0 or above.
current version is 8.0.1.v201012062107-82219.
please update adt to the latest version

原因:
Eclipse的android开发插件版本过低,应该下载ADT-10.0.0,并且
  1. 启动 Eclipse, 然后进入 Help > Install New Software.
  2. 在 Available Software 对话框里,点击 Add....
 


【错误信息】
[2011-03-09 15:21:34 - Info] Failed to install Info.apk on device '?': Unable to open sync connection!
[2011-03-09 15:21:34 - Info] java.io.IOException: Unable to open sync connection!
[2011-03-09 15:21:34 - Info] Launch canceled!
原因:
关闭模拟器和eclipse,执行adb kill-server命令,然后重试一下
 

【错误信息】
调用Webservice时出现
java.net.SocketException: Permission denied (maybe missing INTERNET permission)
原因:
 需要访问到网络,所以,在AndroidManifest.xml中,需要进行如下配置: 

 

【错误信息】
org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG @2:603 injava.io.InputStreamReader@44a3a7b0)
原因有可能是以下2个之一:
1)Webservice服务器的Soap版本为1.0,所以客户端指定
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
VER11改为VER10
2)String serviceUrl = "http://200.200.200.11:10000/nqbx/service/InqBxWebService?wsdl";
Url指的是你的webservice的地址.一般都是以***.wsdl或者***.?wsdl结束的...但是.需要注意的是..要去掉后面的.wsdl或者.?wsdl

eclipse开发android报the method method() is undefined

6. 请大家帮忙看一下这段代码,一直提示The method getText() is undefined for the type String

可能是你定义的数据类型错了,或者是不是为空了,或者是把trim()去掉试试,

7. 在android编程中遇到这样的问题:The method onDestroy() is undefined for the type Object 帮帮解决

这种object 不能用这个onDe...method.   用错了。

在android编程中遇到这样的问题:The method onDestroy() is undefined for the type Object 帮帮解决

8. 在MyEclipse中,如何解决The method createStatement() is undefined for the type connection?

异常不是说了嘛 连接类型 的createStatement() 方法未定义 这就是说你的con 方法运用错误了
给你一个例子 你看一下是不是哪儿用错了;  
public ArrayList getAllEmp() {
		ArrayList list=new ArrayList();
		Connection con=this.getCon();
                                 Statement ste=null;
		ResultSet rs=null;
		try {
		ste=con.createStatement();
                                 rs=ste.executeQuery("select * from emp");
			//rs=pre.executeQuery();
			while(rs.next()){
			emp	em=new emp(rs.getInt(1),rs.getString(2),rs.getString(3),rs.getInt(4));
				list.add(em);
				
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
			return list;
	}