我是使用android6.0 eclipse的,我现在使用httpClient出现了问题 10C

[2016-08-05 10:23:09 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/apache/http/HttpConnection;
[2016-08-05 10:23:09 - Inspectionss] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/apache/http/HttpConnection;
出现了以上问题,这是我在导入org.apache.http.legacy.jar后出现的问题。前提是我根本没用过HttpConnection啊,怎么出现这样的错,网上查一直说重复架包,但不可能啊

8个回答

android 6.0 抛弃了原有的httpClient 你不光得去引 jar 还得去buid里面去配一个

qq_23730523
qq_23730523 我是使用eclipse的,标题上有写
大约 3 年之前 回复

android {
useLibrary 'org.apache.http.legacy'
}

qq_23730523
qq_23730523 我是使用eclipse的,标题上有写
大约 3 年之前 回复

在吧下面那个放在gradle中就好了

qq_23730523
qq_23730523 我是使用eclipse的,标题上有写
大约 3 年之前 回复

你看下你创建的工程使用的库是哪个版本的,6.0的吗

qq_23730523
qq_23730523 原本不是,现在换成6.0的了
大约 3 年之前 回复

Multiple dex files define Lorg/apache/http/HttpConnection; 这个估计是要clean 一下工程, 或者rebuild一下。

eclipse上不支持6.0吧?
在android studio上处理org.apache.http问题:

build.gradle上写上:
1.添加新的tools:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
2.添加引用包
android {
useLibrary 'org.apache.http.legacy'
}

stackOverFlow(处理方式):http://stackoverflow.com/questions/32340629/cant-import-org-apache-http-httpresponse-in-android-studio

你不会是吧Studio上的 项目移到 eclipse 了吧

Android6.0之后已经放弃HttpClient了,既然放弃了就有它的道理,应该主要是性能问题吧,你可以使用OKHttp3,也可以使用Retrofit这些高效的网络访问框架

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
在Android6.0以后如何使用HTTPclient
只需在项目的gradle中加入 useLibrary 'org.apache.http.legacy'
我的eclipse在使用的过程中出现了问题
严重: Javac exception rnUnable to find a javac compiler;rncom.sun.tools.javac.Main is not on the classpath.rnPerhaps JAVA_HOME does not point to the JDKrn at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)rn at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)rn at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)rn at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:381)rn at org.apache.jasper.compiler.Compiler.compile(Compiler.java:463)rn at org.apache.jasper.compiler.Compiler.compile(Compiler.java:442)rn at org.apache.jasper.compiler.Compiler.compile(Compiler.java:430)rn at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)rn at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)rn at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)rn at java.lang.Thread.run(Unknown Source)rn2006-10-27 15:54:18 org.apache.jasper.compiler.Compiler generateClassrn严重: Env: Compile: javaFileName=/D:/新建文件夹/jakarta-tomcat-5.0.25/work/Catalina/localhost/myweb//org/apache/jsp\index_jsp.javarn classpath=D:\新建文件夹\jakarta-tomcat-5.0.25\work\Catalina\localhost\myweb;D:/新建文件夹/jakarta-tomcat-5.0.25/shared/classes/;D:/新建文件夹/jakarta-tomcat-5.0.25/common/classes/;D:/新建文件夹/jakarta-tomcat-5.0.25/common/endorsed/xercesImpl.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/endorsed/xmlParserAPIs.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/lib/ant.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/lib/commons-collections.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/lib/commons-dbcp-1.1.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/lib/commons-el.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/lib/commons-pool-1.1.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/lib/jasper-compiler.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/lib/jasper-runtime.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/lib/jsp-api.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/lib/naming-common.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/lib/naming-factory.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/lib/naming-java.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/lib/naming-resources.jar;D:/新建文件夹/jakarta-tomcat-5.0.25/common/lib/servlet-api.jar;/D:/%e6%96%b0%e5%bb%ba%e6%96%87%e4%bb%b6%e5%a4%b9/jakarta-tomcat-5.0.25/bin/bootstrap.jar;/C:/Program%20Files/Java/j2re1.4.2/lib/ext/dnsns.jar;/C:/Program%20Files/Java/j2re1.4.2/lib/ext/ldapsec.jar;/C:/Program%20Files/Java/j2re1.4.2/lib/ext/sunjce_provider.jar;/C:/Program%20Files/Java/j2re1.4.2/lib/ext/localedata.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\bin\bootstrap.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\work\Catalina\localhost\mywebrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\shared\classesrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\classesrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\endorsed\xercesImpl.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\endorsed\xmlParserAPIs.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\lib\ant.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\lib\commons-collections.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\lib\commons-dbcp-1.1.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\lib\commons-el.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\lib\commons-pool-1.1.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\lib\jasper-compiler.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\lib\jasper-runtime.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\lib\jsp-api.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\lib\naming-common.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\lib\naming-factory.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\lib\naming-java.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\lib\naming-resources.jarrn cp=D:\新建文件夹\jakarta-tomcat-5.0.25\common\lib\servlet-api.jarrn cp=D:\%e6%96%b0%e5%bb%ba%e6%96%87%e4%bb%b6%e5%a4%b9\jakarta-tomcat-5.0.25\bin\bootstrap.jarrn cp=C:\Program%20Files\Java\j2re1.4.2\lib\ext\dnsns.jarrn cp=C:\Program%20Files\Java\j2re1.4.2\lib\ext\ldapsec.jarrn cp=C:\Program%20Files\Java\j2re1.4.2\lib\ext\sunjce_provider.jarrn cp=C:\Program%20Files\Java\j2re1.4.2\lib\ext\localedata.jarrn work dir=D:\新建文件夹\jakarta-tomcat-5.0.25\work\Catalina\localhost\mywebrn extension dir=C:\Program Files\Java\j2re1.4.2\lib\extrn srcDir=D:\新建文件夹\jakarta-tomcat-5.0.25\work\Catalina\localhost\mywebrn include=org/apache/jsp/index_jsp.javarnrn2006-10-27 15:54:18 org.apache.jasper.compiler.Compiler generateClassrn严重: Error compiling file: /D:/新建文件夹/jakarta-tomcat-5.0.25/work/Catalina/localhost/myweb//org/apache/jsp\index_jsp.java [javac] Compiling 1 source filernrnrnrn
使用httpclient出现乱码?
我在使用httpclient提取页面的时候,中文全部不能显示,出现乱码?请问怎么解决?rnrn附:����촦�;���&rn#65533;��������
我的Eclipse使用笔记
新安装的Eclipse,首先得做几个事情: 1. 设置默认编码,用UTF-8 2. 根据个人喜好,设置默认字 体 3. 设置默认的JDK 4. 设置Maven 5. 设置项目统一的Code Formatter(代码格式) 6. 设置统一的Code Template(代码模板) 7. 设置Tomcat 1、修改字体无反应 直接修改工作空间下的配置文件:
android6.0的SDK不能使用httpClient解决方法
android 6.0(api 23) SDK,不再提供org.apache.http.*(只保留几个类). 解决方法 1.eclipse: libs中加入 org.apache.http.legacy.jar 上面的jar包在:**\android-sdk-windows\platforms\android-23\optional下(需要下载android 6.0的SD
我使用Apache出现的问题
我用的是winxp+apache2+php4.3.5+MySQL4.0.18+ZendOptimizer2做服务器。rn今天刚安装了Discuz论坛,但是在页面跳转或刷新的时候apache会报错,说遇到无法修复的问题,需要关闭服务,然后就停掉了。rn今天已经多次遇到这个问题,很不爽。请问哪位大侠有解决方法或建议嘛?rn感谢万分!
使用eclipse出现乱码的问题
Eclipse,Tomcat,JSPrn代码:rn[code=html]<%@ page language="java" contentType="text/html; charset=UTF-8"rn pageEncoding="UTF-8"%>rnrnrnrn rn include动作的测试rnrnrn 使用JSP动态元素包含静态文件 rn rnrn[/code]rnrn2.txt是一个普通的文件。查看其属性时,TEXT FILE ENCODING 选择default(...... type:UTF-8)rnrnrn打开Eclipse后,我就已经进行了以下设置:rnwindow--->preferences---->General---->Content Typesrn随后选择Text选项,将其Default Encoding设置为UFT-8rnrn当我使用html文件时,该文件在浏览器中能够正常显示中文。可是使用include指令后,在网页中也是显示乱码。rnrn可为什么在浏览器中,每次都是现实乱码呢,无论是使用include指令,还是include动作。rnrn我使用的浏览器edge,操作系统win10 64位。rnrn
在使用eclipse的过程中出现了问题
程序编译过程是没有问题的 可是使用http://127.0.0.1:8080访问我的工程时,就出错了。rn注我的页面没有错误,用jbuilder没有问题的。rnrn×××××××××××××××××××××××××××××××××××rnrn错误信息如下:rnrn: Javac exception (2006-11-03 17:44:45,359)rnCompile failed; see the compiler error output for details.rn at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:844)rn at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)rn at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:387)rn at org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)rn at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)rn at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)rn at net.share_info.common.util.EncodingFilter.doFilter(EncodingFilter.java:54)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(.invoke(StandardHostValve.java:195)rn at org.apache.catalina.core.StandardValveContext.invokeNext((StandardEngineValve.java:156)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)rn at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)rn at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)rn at java.lang.Thread.run(Thread.java:595)rn: Env: Compile: javaFileName=/C:/Tomcat 5.0/work/Catalina/localhost/_//org/apache/jsp/roleright\index_jsp.javarn classpath=/C:/Tomcat 5.0/webapps/ROOT/WEB-INF/classes/;/C:/Tomcat 5.0/:/Tomcat 5.0/webapps/ROOT/WEB-INF/lib/jfreechart-1.0.1.jar;/C:/Tomcat 5.0/webapps/ROOT/WEB-INF/lib/jxl.jar;/C:/Tomcat 5.0/webapps/ROOT/WEB-INF//lib/saaj-api-1.3.jar;/C:/Tomcat 5.0/webapps/ROOT-INF/lib/wstx-asl-2.9.3.jar;/C:/Tomcat 5.0/webapps/ROOT/WEB-INF/lib/xbean-2.1.0.jar;/C:/Tomcat 5.0/webapps/ROOT/WEB-INF/lib/xbean-spring-2.4.jar;/C:/Tomcat 5.0/webapps/ROOT/WEB-INF/lib/xfire-aegis-1.1.2.jar;/C:/Tomcat 5.0/webapps/ROOT/WEB-INF/lib/xfire-annotations-1.1.2.jar;/C:/Tomcat 5.0/webapps/ROOT/WEB-INF/lib/xfire-core-1.1.2.jar;/C:/Tomcat 5.0/webapps/ROOT/WEB-INF/lib/-common.jar;C:/Tomcat 5.0/common/lib/naming-factory.jar;C:/Tomcat 5.0/common/lib/naming-java.jar;C:/Tomcat 5.0/common/lib/naming-resources.jar;C:/Tomcat 5.0/common/lib/servlet-api.jar;C:/Tomcat 5.0/common/lib/tools.jar;/C:/Tomcat%205.0/bin/bootstrap.jar;/C:/Program%20Files/Java/jdk1.5.0_06/lib/tools.jar;/C:/Program%20Files/Java/jdk1.5.0_06/jre/lib/ext/dnsns.jar;/C:/Program%20Files/Java/jdk1.5.0C:\Program Files\Java\jdk1.5.0_06/lib/tools.jarrn cp=C:\Tomcat 5.0\webapps\ROOT\WEB-INF\classesrn cp=C:\Tomcat 5.0\common\lib\naming-resources.jarrn cp=C:\Tomcat 5.0\common\lib\servlet-api.jarrn cp=C:\Tomcat 5.0\common\lib\tools.jarrn cp=C:\Tomcat%205.0\bin\bootstrap.jarrn cp=C:\Program%20Files\Java\jdk1.5.0_06\lib\tools.jarrn cp=C:\Program%20Files\Java\jdk1.5.0_06\jre\lib\ext\dnsns.jarrn cp=C:\Program%20Files\Java\jdk1.5.0_06\jre\lib\ext\localedata.jarrn cp=C:\Program%20Files\Java\jdk1.5.0_06\jre\lib\ext\sunjce_provider.jarrn cp=C:\Program%20Files\Java\jdk1.5.0_06\jre\lib\ext\sunpkcs11.jarrn work dir=C:\Tomcat 5.0\work\Catalina\localhost\_rn extension dir=C:\Program Files\Java\jdk1.5.0_06\jre\lib\extrn srcDir=C:\Tomcat 5.0\work\Catalina\localhost\_rn include=org/apache/jsp/roleright/index_jsp.javarn (2006-11-03 17:44:45,390)rn: Error compiling file: /C:/Tomcat 5.0/work/Catalina/localhost/_//org/apache/jsp/roleright\index_jsp.java [javac] Compiling 1 source filern [javac] javac: 无效的标志: C:\Tomcatrn [javac] 用法:javac rn [javac] 其中,可能的选项包括:rn [javac] -g 生成所有调试信息rn [javac] -g:none 不生成任何调试信息rn [javac] -g:lines,vars,source 只生成某些调试信息rn [javac] -nowarn 不生成任何警告rn [javac] -verbose 输出有关编译器正在执行的操作的消息rn [javac] -deprecation 输出使用已过时的 API 的源位置rn [javac] -classpath 指定查找用户类文件的位置rn [javac] -cp 指定查找用户类文件的位置rn [javac] -sourcepath 指定查找输入源文件的位置rn [javac] -bootclasspath 覆盖引导类文件的位置rn [javac] -extdirs 覆盖安装的扩展目录的位置rn [javac] -endorseddirs 覆盖签名的标准路径的位置rn [javac] -d 指定存放生成的类文件的位置rn [javac] -encoding 指定源文件使用的字符编码rn [javac] -source 提供与指定版本的源兼容性rn [javac] -target 生成特定 VM 版本的类文件rn [javac] -version 版本信息rn [javac] -help 输出标准选项的提要rn [javac] -X 输出非标准选项的提要rn [javac] -J 直接将 传递给运行时系统rnrnrn (2006-11-03 17:44:45,421)
Android6.0不能用httpclient
现在编译器不能用httpclient,要导入什么包可以用呢?
我的连接池使用出现错误
刚学jsp,树上有这样的程序:但运行后结果不正确!请高手指教!!!谢谢先!!rn<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,javax.naming.*,javax.sql.*" errorPage="" %>rnrnrnrn rn 连接池连接MS SQL Server 2000rnrnrn<%rn out.print("使用连接池连接MS SQL Server 2000 ");rn out.println(" ");rn Context ctx=null;rn DataSource ds=null;rn Statement stmt=null;rn ResultSet rs=null;rn Connection con=null;rn ResultSetMetaData md=null;rn tryrn ctx = new InitialContext();rn ds = (DataSource)ctx.lookup("java:comp/env/jdbc/firm");rn con=ds.getConnection();rn stmt=con.createStatement(); rn rs=stmt.executeQuery("select * from user");rn md=rs.getMetaData();rn out.print(md.getColumnLabel(1)+" ");rn out.print(md.getColumnLabel(2)+" ");rn while(rs.next())rn out.print(rs.getInt(1)+" ");rn out.print(rs.getString(2)+" ");rn rn catch(Exception e)rn out.print(e);rn finallyrn if(rs!=null)rs.close();rn if(stmt!=null)stmt.close();rn if(con!=null)con.close();rn rn%>rnrnrnrn结果显示如下:rnjavax.naming.NameNotFoundException: Name jdbc is not bound in this Context rn不知是什么问题?
HttpClient并发使用的问题
情况是这样的,我有一个系统A,和一个系统B,他们都在同一个Weblogic下,系统A有些业务要通过系统B处理,A通过HttpClient框架跟B通讯,B返回处理结果给A。现在我客户端同时向A发起40个请求,然后A调用完B后,B不是立即返回给A处理结果,好像是一下子返回20个左右处理结果给A,然后A返回给客户端rnA的请求代码:PostMethod post = new PostMethod(postUrl);rn post.addParameter(dataKey,value);rn HttpClient client = new HttpClient();rn client.getHttpConnectionManager().getParams().setSoTimeout(timeout);rn client.getHttpConnectionManager().getParams().setDefaultMaxConnectionsPerHost(400);rn int rescode = client.executeMethod(post);rn if(rescode != HttpStatus.SC_OK)rn return "888888";rn rn String res = post.getResponseBodyAsString();rn post.releaseConnection();rn if(res != null)rn return res;rnB就是把一个处理结果写回给A:PringWriter pw = response.getWriter();rn pw.print(result);rn pw.flush();rn pw.close();rn就是这样一个架构,假如同时没那么多请求的话,一切正常,但是40个并发请求的时候,B已经处理好了20个左右的请求了,然后pw.close()之后A没有收到回应,A是在基本同一时间收到B的回应的,白白等待了差不多10秒rn
使用httpclient的cookies的问题
我使用httpclient时,设置cookies,当其中有中文时,httpclient出现警告,代码死在那了,不知道什么原因,有谁遇到过同类的问题吗?rnhttpclient警告如下:rnWARN org.apache.commons.httpclient.cookie.CookieSpec : Invalid cookie state: domain not specifiedrnrn我调用的方法如下:rnHttpClient client = new HttpClient();rnHttpState state = client.getState();rn if(getContext().get(REQUEST_COOKIE) instanceof Cookie[])rn Cookie[] cookiesIn = (Cookie[]) getContext().get(REQUEST_COOKIE);rn if(cookiesIn[0] != null)rn for (int i=0;i
apache httpclient使用问题
问题的简单描述:rn 在使用post提交参数时,明明带过去的参数有11个,但是用抓包软件抓去的post参赛只带过去了10个,其中javax.faces.ViewState这个参赛对应的hashcode值被截取了一部分,最后一个参赛不见了?这是怎么回事?难道有设置最大的参赛长度?怎么设置?rn 以下是代码部分:rn //提交的参数rn mapPostOneContent.put(URLEncoder.encode("AJAXREQUEST","UTF-8"), URLEncoder.encode("_viewRoot", "UTF-8"));rn mapPostOneContent.put(URLEncoder.encode("_authKey","UTF-8"), URLEncoder.encode("", "UTF-8"));rn mapPostOneContent.put(URLEncoder.encode("j_id2:province","UTF-8"), URLEncoder.encode("31", "UTF-8"));rn mapPostOneContent.put(URLEncoder.encode("username","UTF-8"), URLEncoder.encode(userName, "UTF-8")); rn mapPostOneContent.put(URLEncoder.encode("password","UTF-8"), URLEncoder.encode("", "UTF-8")); rn mapPostOneContent.put(URLEncoder.encode("tokenPwd","UTF-8"), URLEncoder.encode("", "UTF-8")); rn mapPostOneContent.put(URLEncoder.encode("verifyCode","UTF-8"), URLEncoder.encode("", "UTF-8")); rn mapPostOneContent.put(URLEncoder.encode("j_id2_link_hidden_","UTF-8"), URLEncoder.encode("[object]", "UTF-8"));rn mapPostOneContent.put(URLEncoder.encode("j_id2_SUBMIT","UTF-8"), URLEncoder.encode("1", "UTF-8"));rn mapPostOneContent.put(URLEncoder.encode("javax.faces.ViewState","UTF-8"), URLEncoder.encode(realHashCode, "UTF-8"));rn mapPostOneContent.put(URLEncoder.encode("j_id2:j_id5","UTF-8"), URLEncoder.encode("j_id2:j_id5", "UTF-8"));rnrn//抓包软件抓到的post请求体:rn[2013/6/13 19:56:17:215]rnPOST (隐藏。。。)rnAccept-Language: zh-cnrnUser-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E; doyo 2.1.4)rnConnection: Keep-AlivernAccept-Encoding: gzip, deflaternCookie: JSESSIONID=39nMR5zWhwL2G0CQ3vcGQ9BrXqVNQYpn00yP1SVhhJJRl5nlwlsr!-1008914258;LOGINVERIFYCODE=xdvMK4o8loc=rnReferer: (隐藏。。。)rnAccept: */*rnContent-Type: application/x-www-form-urlencoded; charset=UTF-8rnCache-Control: no-cachernHost: (隐藏。。。)rnContent-Length: 6069rnrnAJAXREQUEST=_viewRoot&_authKey=&j_id2%253Aprovince=31&username=DZYX01&password=&tokenPwd=&verifyCode=&j_id2_link_hidden_=%255Bobject%255D&j_id2_SUBMIT=1&javax.faces.ViewState=H4sIAAAAAAAAAOVba4wkRR2vnd3b29u94x4LHBBP524v7C431%252FPomZ0Z1gssexyMzO6du%252BuBx4eh%250D%250AZ7pmp%252Fdmutvump2eOxYODJBI5MBHFAU10Q8mQkyMQR6KIASCQRIw%252BoEPioZoMIjGaFA%252FqFXV757u%250D%250AeeyCWXSSrZ2urn%252FV%252F%252FH7%252F%252Btfj3nkj2BLXQGjN%252BdXuFWOqXLiMnO8uAJLaPr%252BV276%252Bi51shoCQJMB%250D%250AAP2qAq6QlGWGW%252BG05IpaZjhZrgolDgmSyCwpEC4ipV5CdQXOSzy88%252FyfvvxceWxoOyE%252FA8AAAGMu%250D%250A6pJUkyURioiZwVUnBdhYkCQEthVWza%252F6ZxCMEd40psyVoOogq6BalbkeF8ckpQa2rBQEPmHQjIBI%250D%250AwFgWERn0WF0sEe51YhaYn3UQpzZCPLUR4rRB2g%252BiHYkp2QlO4WoQQUWnz1iDr48%252Bu376QUIfj1kd%250D%250AXNHB0DlRrqPrBZ6HIhiSFWlVEEvQop7sQH28jjD5EtSQMbBtcJZyLnOlCmRqTd8eMJnNA%252B1kqK5C%250D%250ARcSi9KAA%252FE5n4wQnwioYlOQTnKoa5H0g1SMfi7CkQMyJjDtpSAq%252Ffk6GJXlJOg3FEw3e4mZ9WkHu%250D%250AbmxecBDo3981Q9sl%252BSRUhHJzFgeTjbE0vOrtCICDmIpR6yKFSxUilUHcMlMXmFmztwVY1nGSsAHa%250D%250AK8QSSRvb3VhkAcqQwwyLEhJKMC%252BoaF0Mmy7dTUhoxcEiJPpCTUvpvbjlaEXg52qcJtTqNU9HXepg%250D%250AEXGoruqSsLbqDxNaRShVAtlYwC%252FnoKpyy9AkT6xHfWzSkry3cKxTp9Y1phnFgVb%252FFLiNfgtZ3%252Fp9%250D%250Avg1Z37Y6J01ZJtXb8Fy9m87odSRgTjm1MsfJW7a%252B%252FuxzF9%252Fyaj8IHQPDVYnjj3ElJCk5sA1VFKhW%250D%250ApCqvyVddTXvd3hjC5S7Kkizj%252FnbZ%252FeWlEleFt%252F199y0Pxf7xdggM5MBQBY9Rwh6WB1tLUl1EShOB%250D%250APTSriJKsIoqTA0Fcns6DIfJYx0YijO7AzVcrn[2013/6/13 19:56:17:283]rn++++++++++++++++++++++++++++++++++++++++++++rn最后一个参赛的值没有完全被带过去,最后一个参数j_id2:j_id5直接没待过去。rn谁可以帮忙解决一下,谢谢
有关使用HttpClient的问题
我用HttpClient操作Web页面,已经实现了成功登陆,然后rn抽取我要的url,然后进到发送邮件的页面.rn我把需要的参数都填在NameValuePair里了,然后再调用PostMethodrn的setRequestBody函数,设置好所有的参数.(参数设置是正确的,我用rnFiddler抓它的请求下来,和我设置的格式是一样的)rn执行返回结果:rn rn我试过很多种的方式,都是这个结果,不知道到底是哪里rn出问题了,请大侠帮忙,是不是少了什么步骤,还是什么.
使用httpclient 验证码问题
如题 我自己写个模拟登陆 我要把http://sjb.wap856.com/Picture.aspx的验证码 通过使用httpclient应该怎么把它存成一个图片保存本地 但是再我登陆时连接本地验证码图片时 始终在一个会话中 验证码不会过期 希望高手解答 或者帮我写写代码 不胜感激
HttpClient使用的问题
import org.apache.http.HttpEntity;rnimport org.apache.http.HttpResponse;rnrn为什么引用这两个包的时候总提示找不到呢?rn我引用的是官网上下的 httpclient-4.0.jar、httpmime-4.0.jar
我使用字符串变量时出现的问题?
后台数据库使用SQL Server,从数据库中读取一字符串(长度80),可在网页上显示的字符串却被截去了一部分。why?I don't know!!请各位指教
我在动态使用ADOConnection出现的问题?
rn 在我的的程序里面我想用ADOConnection在不同的时间段动态的调用两个不同的数据库(master 及 jin)rnrn1. ADOConnection1.ConnectionString:='Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=master;Data Source=computer1;rnrnrn2. ADOConnection1.ConnectionString:='Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=jin;Data Source=computer1;rnrnrn在执行第2条时候就出错.rnrn 错误信息:.......对象打开时,操作不被允许.....rnrn
我在使用active skin时出现的问题!
为什么我的标签控件应用不上效果呢!可别的其它控件都好使啊!rnrn有人知道怎么回事吗?
在使用jcreat4中,出现了问题,求解(我是新手)
源代码如下:rnpublic class TestWhile rnrn public static void main(String[] args) rn rn // TODO code application logic herern int data;rn int sum=0;rn rn //Read an initialrn System.out.println("Enter an int value");rn data=MyInput.readInt();rn rn //keep reading data until the input is 0rn while(data!=0)rn rn sum+=data;rn System.out.println("Enter an int value,the program exits if the input is 0");rn data=MyInput.readInt();rn rn System.out.println("The sum is"+sum);rn rnrnrn请问为什么在jcreat por4下运行会出现如下的错误:rnrnEnter an int valuern45rnException in thread "main" java.lang.NumberFormatException: For input string: "Enter an int value"rn at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)rn at java.lang.Integer.parseInt(Integer.java:447)rn at java.lang.Integer.parseInt(Integer.java:497)rn at MyInput.readInt(MyInput.java:31)rn at TestWhile.main(TestWhile.java:29)rnrnProcess completed.rn
我使用的是resin+jsp+oracle,出现了如下问题,请教??
java.lang.NullPointerExceptionrn at oa.common.ConnectionPool.(ConnectionPool.java:21)rn at _oa._login__jsp._jspService(/oa/conn.jsp:60)rn at com.caucho.jsp.JavaPage.service(JavaPage.java:75)rn at com.caucho.jsp.Page.subservice(Page.java:486)rn at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)rn at com.caucho.server.http.Invocation.service(Invocation.java:311)rn at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)rn at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:218)rn at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:160)rn at com.caucho.server.TcpConnection.run(TcpConnection.java:137)rn at java.lang.Thread.run(Thread.java:484)rn
HttpClient使用
NULL 博文链接:https://wangw5512.iteye.com/blog/2165737
我是说使用ReadMomery
我是说使用ReadMomery
我是说使用ReadMomery (
我是说使用ReadMomery (
我使用的是VS2008和sqlServer2008
我使用的是VS2008和sqlServer2008rn但是有个问题rn用VS导入项目后,但是数据库连接出错rn在asp.net中,如何导入在网上下载的源代码网站文件rn我把mdf添加到sqlServer中的时候,但是出现问题了rnmdf不能添加rn报错rn无法打开物理文件 "C:\邮件系统源码\DB_51aspx\WebMailDB.mdf"。操作系统错误 5:"5(拒绝访问。)"。
我是女程序员,我现在工作上不爽
我是女程序员,我现在工作上不爽,目前我做的项目,遇到难题了,死都搞不出来了rnrn再加上公司只追求效率,我做的地方比别人的都要难。rnrn我才毕业,好辛苦,没人问,自己也琢磨了很长时间,我现在的心态是好想甩手不管这个项目了。rnrn怎么办,我心态变成这样的了,怎么办,怎么办?救命啊,我是.NET程序员
关于HttpClient的问题,如何使用HttpClient重定向?
nn```n /*n * HttpRequestProxy.javan *n * Created on November 3, 2008, 9:53 AMn */nnnimport java.io.BufferedReader;nimport java.io.IOException;nimport java.io.InputStream;nimport java.io.InputStreamReader;nimport java.util.HashMap;nimport java.util.Iterator;nimport java.util.Map;nimport java.util.Set;nnimport org.apache.commons.httpclient.Header;nimport org.apache.commons.httpclient.HttpClient;nimport org.apache.commons.httpclient.HttpException;nimport org.apache.commons.httpclient.HttpMethod;nimport org.apache.commons.httpclient.NameValuePair;nimport org.apache.commons.httpclient.SimpleHttpConnectionManager;nimport org.apache.commons.httpclient.methods.GetMethod;nimport org.apache.commons.httpclient.methods.PostMethod;nnnpublic class HttpRequestProxy n // 超时间隔n private static int connectTimeOut = 60000;n // 让connectionmanager管理httpclientconnection时是否关闭连接n private static boolean alwaysClose = false;n // 返回数据编码格式n private String encoding = "UTF-8";nn private final HttpClient client = new HttpClient();nn public HttpClient getHttpClient() n return client;n n /**n * 用法: HttpRequestProxy hrp = new HttpRequestProxy();n * hrp.doRequest("http://www.163.com",null,null,"gbk");n * n * @param urln * 请求的资源URLn * @param postDatan * POST请求时form表单封装的数据 没有时传nulln * @param headern * request请求时附带的头信息(header) 没有时传nulln * @param encodingn * response返回的信息编码格式 没有时传nulln * @return response返回的文本数据n * @throws CustomExceptionn */n public String doRequest(String url, Map postData, Map header, String encoding) throws Exception n String responseString = null;n // 头部请求信息n Header[] headers = null;n if (header != null) n Set entrySet = header.entrySet();n int dataLength = entrySet.size();n headers = new Header[dataLength];n int i = 0;n for (Iterator itor = entrySet.iterator(); itor.hasNext();) n Map.Entry entry = (Map.Entry) itor.next();n headers[i++] = new Header(entry.getKey().toString(), entry.getValue().toString());n n n n // post方式n if (postData != null) n PostMethod postRequest = new PostMethod(url.trim());n if (headers != null) n for (int i = 0; i < headers.length; i++) n postRequest.setRequestHeader(headers[i]);n n n Set entrySet = postData.entrySet();n int dataLength = entrySet.size();n NameValuePair[] params = new NameValuePair[dataLength];n int i = 0;n for (Iterator itor = entrySet.iterator(); itor.hasNext();) n Map.Entry entry = (Map.Entry) itor.next();n params[i++] = new NameValuePair(entry.getKey().toString(), entry.getValue().toString());n n postRequest.setRequestBody(params);n try n responseString = this.executeMethod(postRequest, encoding);n catch (Exception e) n throw e;n finally n postRequest.releaseConnection();n n n return responseString;n nn private String executeMethod(HttpMethod request, String encoding) throws Exception n String responseContent = null;n InputStream responseStream = null;n BufferedReader rd = null;n try n this.getHttpClient().executeMethod(request);n if (encoding != null) n responseStream = request.getResponseBodyAsStream();n rd = new BufferedReader(new InputStreamReader(responseStream, encoding));n String tempLine = rd.readLine();n StringBuffer tempStr = new StringBuffer();n String crlf = System.getProperty("line.separator");n while (tempLine != null) n tempStr.append(tempLine);n tempStr.append(crlf);n tempLine = rd.readLine();n n responseContent = tempStr.toString();n elsen responseContent = request.getResponseBodyAsString();nn Header locationHeader = request.getResponseHeader("location");n // 返回代码为302,301时,表示页面己经重定向,则重新请求location的url,这在n // 一些登录授权取cookie时很重要n if (locationHeader != null) n String redirectUrl = locationHeader.getValue();n this.doRequest(redirectUrl, null, null, null);n n catch (HttpException e) n throw new Exception(e.getMessage());n catch (IOException e) n throw new Exception(e.getMessage());nn finally n if (rd != null)n try n rd.close();n catch (IOException e) n throw new Exception(e.getMessage());n n if (responseStream != null)n try n responseStream.close();n catch (IOException e) n throw new Exception(e.getMessage());nn n n return responseContent;n nn /**n * 特殊请求数据,这样的请求往往会出现redirect本身而出现递归死循环重定向 所以单独写成一个请求方法n * 比如现在请求的url为:http://localhost:8080/demo/index.jsp 返回代码为302n * 头部信息中location值为:http://localhost:8083/demo/index.jspn * 这时httpclient认为进入递归死循环重定向,抛出CircularRedirectException异常n * n * @param urln * @returnn * @throws CustomExceptionn */n public String doSpecialRequest(String url, int count, String encoding) throws Exception n String str = null;n InputStream responseStream = null;n BufferedReader rd = null;n GetMethod getRequest = new GetMethod(url);n // 关闭httpclient自动重定向动能n getRequest.setFollowRedirects(false);n try nn this.client.executeMethod(getRequest);n Header header = getRequest.getResponseHeader("location");n if (header != null) n // 请求重定向后的URL,count同时加1n this.doSpecialRequest(header.getValue(), count + 1, encoding);n n // 这里用count作为标志位,当count为0时才返回请求的URL文本,n // 这样就可以忽略所有的递归重定向时返回文本流操作,提高性能n if (count == 0) n getRequest = new GetMethod(url);n getRequest.setFollowRedirects(false);n this.client.executeMethod(getRequest);n responseStream = getRequest.getResponseBodyAsStream();n rd = new BufferedReader(new InputStreamReader(responseStream, encoding));n String tempLine = rd.readLine();n StringBuffer tempStr = new StringBuffer();n String crlf = System.getProperty("line.separator");n while (tempLine != null) n tempStr.append(tempLine);n tempStr.append(crlf);n tempLine = rd.readLine();n n str = tempStr.toString();n nn catch (HttpException e) n throw new Exception(e.getMessage());n catch (IOException e) n throw new Exception(e.getMessage());n finally n getRequest.releaseConnection();n if (rd != null)n try n rd.close();n catch (IOException e) n throw new Exception(e.getMessage());n n if (responseStream != null)n try n responseStream.close();n catch (IOException e) n throw new Exception(e.getMessage());n n n return str;n nn public static void main(String[] args) throws Exception nn HttpRequestProxy hrp = new HttpRequestProxy();n Map date = new HashMap();n date.put("jyidApplet", "1");n date.put("codeNumApplet", "1");n date.put("jymxIdApplet", "447");n date.put("patientIdApplet", "1118");n String str = hrp.doRequest("http://127.0.0.1:8080/lis/mz/addTM",date, null, null);n System.out.println(str);n n nnnn```nn
我使用的是jquery.validate插件,验证问题
rn rn rn 我的验证代码是这样:rn rn rn Js代码  nrnrn n /* 正确信息的显示位置 */  rn success: function(label)   rn    label.html(" ").parent().parent().removeClass("error").addClass("pass");  rn ,  rn /* 错误信息的显示位置 */  rn errorPlacement: function(error, element)   rn     element.parent().parent().removeClass("pass").addClass("error");  rn     element.parent().next().html("");  rn     error.appendTo( element.parent().next());  rn ,  rnnrn 验证失败之后:rn rn  rn 验证成功:rn rn 再次验证失败:rn rn 那个样式的打钩打叉就不会改变了 !rn 求帮助啊!rnrnrn
我是菜了,函数的使用问题
long IsoColors::MakeGradientColorset(long nCount, unsigned long crStart, unsigned long crEnd)rn我使用该函数时rn objColors.MakeGradientColorset(20,RGB(255,0,0),RGB(0,255,0));rn这样写却达不到要求的效果,不请各位指点我函数在使用的时候用错了吗?后面两个参数需要指定颜色值
我是新手,请教''和空格的使用问题
在SQL语句中 ''和空格是怎样使用的,我刚接触SQL 在课本里面没有详细的说明,有时候我全敲完了,可是运行的时候不正确,要重新修改关于 空格 和 '' ,尤其是 空格 .rn在什么时候用 空格 啊,我不清楚,请高手赐教!rn 小弟现在分数太少了,就不给了,不好意思
我使用的是.net3.5平台问题。
rn我是实现 ajax 自动提示功能,一直都是挺好的可是 然出现以下问题rnrn未能从程序集“System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”中加载类型“System.Web.UI.ScriptReferenceBase”。
实时串口通信的问题(我使用的是SPComm)
我用SPComm做的一个实时串口通信的程序。总觉得效果不理想。rn我处理串口通信的代码如下:rnconstrn DELAYBEFOREPROC=200;rnvarrn comm: TComm;rn g_sendData: Array[1..100] of char;rnprocedure executeComm(dataLength: Integer);rnbeginrn if not comm.SendDataEmpty thenrn sleep(100);rn comm.WriteCommData(g_sendData,dataLength);rn //iDataLength := 0;rn sleep(DELAYBEFOREPROC);rn application.ProcessMessages;rnend;rn请大家帮忙下,怎么样才能提高效率?
这是我在使用eclipse时出现的错误!!!请大家帮忙!!
[img=http://img1.ph.126.net/A6cWqvmM2tP4aLpStlKr_g==/3176726587157997383.jpg][/img]rnrn我是新手
我在eclipse中使用TortoiseCVS,update的时候总是出现错误
我使用的是:TortoiseCVS 1.8.26 、 Eclipse 3.2rnrn当update更新项目时,显示如下错误:rn Problems reported while synchronizing CVS Workspace.0 of 1 resources were synchronized.rnrn更新失败~rnrnrn请问有人碰到过这种事情吗
我使用sort函数的问题
主要代码如下rnclass T_point rnrnpublic:rn float x;rn float y;rn float z;rn T_point();rn virtual ~T_point();rnrn;rnrnclass T_TIN rnrnpublic:rn float GetXMax();rn T_TIN();rn virtual ~T_TIN();rn list pointList;rn list lineList;rn list triList;rnrn;rnrnfloat T_TIN::GetXMax()rnrn list::iterator iter=pointList.begin();rn list::iterator iter_end=pointList.end();rn sort(iter,iter_end,MyGreaterX);rnrn return (*iter).x;rnrnrnbool MyGreaterX(T_point &a, T_point &b)rnrn return a.x>b.x;rnrnrn--------------------Configuration: TinObject - Win32 Debug--------------------rnCompiling...rnT_TIN.cpprnd:\program files\microsoft visual studio\vc98\include\algorithm(592) : error C2784: '_D __cdecl std::operator -(const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &,const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &)' : could not deduce temprnlate argument for 'const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &' from 'class std::list >::iterator'rn d:\program files\microsoft visual studio\vc98\include\algorithm(589) : see reference to function template instantiation 'void __cdecl std::_Sort_0(class std::list >::iterator,class std::list >::iterator,bool (__cdecl *)(class T_point &,class T_point &),class T_point *)' being compiledrnd:\program files\microsoft visual studio\vc98\include\algorithm(592) : error C2784: '_D __cdecl std::operator -(const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &,const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &)' : could not deduce temprnlate argument for 'const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &' from 'class std::list >::iterator'rn d:\program files\microsoft visual studio\vc98\include\algorithm(589) : see reference to function template instantiation 'void __cdecl std::_Sort_0(class std::list >::iterator,class std::list >::iterator,bool (__cdecl *)(class T_point &,class T_point &),class T_point *)' being compiledrnd:\program files\microsoft visual studio\vc98\include\algorithm(592) : error C2784: '_D __cdecl std::operator -(const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &,const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &)' : could not deduce temprnlate argument for 'const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &' from 'class std::list >::iterator'rn d:\program files\microsoft visual studio\vc98\include\algorithm(589) : see reference to function template instantiation 'void __cdecl std::_Sort_0(class std::list >::iterator,class std::list >::iterator,bool (__cdecl *)(class T_point &,class T_point &),class T_point *)' being compiledrnd:\program files\microsoft visual studio\vc98\include\algorithm(592) : error C2784: '_D __cdecl std::operator -(const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &,const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &)' : could not deduce temprnlate argument for 'const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &' from 'class std::list >::iterator'rn d:\program files\microsoft visual studio\vc98\include\algorithm(589) : see reference to function template instantiation 'void __cdecl std::_Sort_0(class std::list >::iterator,class std::list >::iterator,bool (__cdecl *)(class T_point &,class T_point &),class T_point *)' being compiledrnd:\program files\microsoft visual studio\vc98\include\algorithm(592) : error C2676: binary '-' : 'class std::list >::iterator' does not define this operator or a conversion to a type acceptable to thrne predefined operatorrn d:\program files\microsoft visual studio\vc98\include\algorithm(589) : see reference to function template instantiation 'void __cdecl std::_Sort_0(class std::list >::iterator,class std::list >::iterator,bool (__cdecl *)(class T_point &,class T_point &),class T_point *)' being compiledrnd:\program files\microsoft visual studio\vc98\include\algorithm(596) : error C2784: 'class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> __cdecl std::operator +(_D,const class std::reverse_iterator<_RI,_Ty,_Rt,_Pt,_D> &)' : could not deduce template argrnument for '' from 'class std::list >::iterator'rn d:\program files\microsoft visual studio\vc98\include\algorithm(589) : see reference to function template instantiation 'void __cdecl std::_Sort_0(class std::list >::iterator,class std::list >::iterator,bool (__cdecl *)(class T_point &,class T_point &),class T_point *)' being compiledrnd:\program files\microsoft visual studio\vc98\include\algorithm(596) : error C2676: binary '+' : 'class std::list >::iterator' does not define this operator or a conversion to a type acceptable to thrne predefined operatorrn d:\program files\microsoft visual studio\vc98\include\algorithm(589) : see reference to function template instantiation 'void __cdecl std::_Sort_0(class std::list >::iterator,class std::list >::iterator,bool (__cdecl *)(class T_point &,class T_point &),class T_point *)' being compiledrnd:\program files\microsoft visual studio\vc98\include\algorithm(596) : error C2780: 'void __cdecl std::_Insertion_sort(_RI,_RI)' : expects 2 arguments - 3 providedrn d:\program files\microsoft visual studio\vc98\include\algorithm(569) : see declaration of '_Insertion_sort'rn d:\program files\microsoft visual studio\vc98\include\algorithm(589) : see reference to function template instantiation 'void __cdecl std::_Sort_0(class std::list >::iterator,class std::list >::iterator,bool (__cdecl *)(class T_point &,class T_point &),class T_point *)' being compiledrnd:\program files\microsoft visual studio\vc98\include\algorithm(597) : error C2676: binary '+=' : 'class std::list >::iterator' does not define this operator or a conversion to a type acceptable to trnhe predefined operatorrn d:\program files\microsoft visual studio\vc98\include\algorithm(589) : see reference to function template instantiation 'void __cdecl std::_Sort_0(class std::list >::iterator,class std::list >::iterator,bool (__cdecl *)(class T_point &,class T_point &),class T_point *)' being compiledrnError executing cl.exe.rnrnTinObject.exe - 9 error(s), 0 warning(s)rnrn问题出在这里面algorithm,请大家指点rn另外我使用连表本身的排序函数rnpointlist.sort(MyGreaterX),为什么不行啊rn
我在使用CbuttonST问题
我在使用CbuttonST的时候发现当两个窗口切换后 透明的那种按钮边缘会出现上一个窗口和痕迹 就好像覆盖了一下一样。rn怎么解决啊。谁用过啊。
我公司现在使用框架(框架原代码)
我公司现在正在使用的框架,我看完了,相当完美。 我个人认为它能使你从一个中级程序员跨要高级 错过了你这辈子都会后悔。
我C++用的是codeblock然后现在使用QT的库,按照网上的教程配置了,出现了问题
进入工程后 ---> 项目选择 --->属性 ---> 将This is a custom Makefile选中.rn code blocks 自带例程 ---> qmake ---> qmake2 --->buildrn然后就出现了一个错误:rnrn-------------- Build: Debug in ceshi (compiler: GNU GCC Compiler)---------------rnrnRunning command: make.exe -f Makefile DebugrnExecution of 'make.exe -f Makefile Debug' in 'D:\Qt\cccccccccccccccccccccccccceshi\ceshi' failed.rnNothing to be done (all items are up-to-date).rnrn第二句话是什么意思,怎么解决 ,,谢谢各位了,
使用Android6.0手机测试闪退
[color=#FF0000]使用的Android 4.2版本测试时,程序没问题。当使用6.0版本测试时,进入到登录界面之后就会闪退。[/color]rnrn[color=#FF0000]Logcat日志[/color]rn06-23 12:06:20.389 15567-15567/W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawablern06-23 12:06:20.427 15567-15567/I/BitmapFactory: set decoder allocator to grallocrn06-23 12:06:20.428 15567-15567/I/gralloc: ddr_interlace_info = 128rn06-23 12:06:20.428 15567-15567I/gralloc: Alloc req: dev=0xe43dc680, w=1502, h=538, format=0x1, usage=0x2000003rn06-23 12:06:20.429 15567-15567/I/gralloc: Alloc handle(0xf458a300): interfmt=0x1, stride=1536, size=3317760rn06-23 12:06:20.462 15567-15567/I/gralloc: Alloc req: dev=0xe43dc680, w=1377, h=493, format=0x1, usage=0x2000003rn06-23 12:06:20.463 15567-15567/I/gralloc: Alloc handle(0xf458a100): interfmt=0x1, stride=1408, size=2793472rn06-23 12:06:20.473 15567-15567/I/gralloc: Free handle(0xf458a100)rn06-23 12:06:20.473 15567-15567/I/gralloc: Free handle(0xf458a300)rn06-23 12:06:20.475 15567-15578/I/art: humin current process: com.huazhichengsi.wu.rfidrn06-23 12:06:20.475 15567-15578/I/art: current process_level is : rn06-23 12:06:20.525 15567-15599/I/OpenGLRenderer: Initialized EGL, version 1.4rn06-23 12:06:22.555 15567-15597/I/Process: Sending signal. PID: 15567 SIG: 9rn
Android6.0权限的使用
Android6.0权限的使用 随着Android发布的版本原来越高,Android6.0新增加的动态权限不仅提高了用户体验,还增加了用户对于使用过程中隐私数据的保护,还使的开发者作出了相应的改变。
相关热词 c# login 居中 c# 考试软件 c# 自然语言分析 c# 分段读取文件 c# 泛型反射 c#打断点 c# 时间转多少秒 c# 线程函数加参数 c# modbus 读取 c#查询集合表