草庐IT

page_request

全部标签

java - Android OkHttp 库 : GET Request - Exception EOFException:\n not found: size=0 content=

我在我的应用程序OkHttp库(http://square.github.io/okhttp/)中使用,在一个简单的GET请求中我得到了这个异常:Causedby:java.io.EOFException:\nnotfound:size=0content=...atokio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:201)atcom.squareup.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:191)...u

Android PdfDocument.Page - 图像大小问题

在PdfDocument.Page上绘图时,我遇到了图像变大的问题。该应用程序适用于运行Android4.4.4(API级别19)的设备。我正在生成一个pdf文档并添加一个图像,如下所示:PdfDocumentdocument=newPdfDocument();//CreateanA4sizedpage595x842inPostscriptpoints.PdfDocument.PageInfopageInfo=newPdfDocument.PageInfo.Builder(595,842,1).create();PdfDocument.Pagepage=document.startPa

android - 谷歌位置 API : request location updates with pending intent?

我已经开始使用thistutorial实现GoogleLocationAPI.我已经设法让它在我的应用程序中正常工作,它会以正确的时间间隔更新我的位置等。现在我正在研究如何在设备处于sleep模式时更新我的​​位置。根据documentation,这种方法是要走的路:publicvoidrequestLocationUpdates(LocationRequestrequest,PendingIntentcallbackIntent);我的问题是,如何设置此PendingIntent,以及如何处理它?我看过有关如何处理其他类型Intent的教程,但我不确定如何将它们应用到此。

安卓 6 棉花糖 : requests for some specific permissions are instantly denied with no ui shown

使用官方AVD版本。3这样调用:ActivityCompat.requestPermissions(activity,newString[]{"android.permission.USE_CREDENTIALS"},REQUEST_PERMISSION_CREDENTIALS);立即触发:onRequestPermissionsResult(intrequestCode,String[]permissions,int[]grantResults)结果代码是PackageManager.PERMISSION_DENIED谁有解决办法?更新:已知受影响:Manifest.permissi

widget - flutter : How to navigate to new page after state change?

状态改变后如何导航到新页面?我有一个需要先登录的应用程序。只有在登录后,应用程序组件才会完全创建。所以我写了这样的东西:主应用classAppComponentStateextendsStateimplementsCredentialProvider{Credentialcredential;@overrideWidgetbuild(BuildContextcontext){if(credential==null){returnnewMaterialApp(routes:{'/':(BuildContextcontext)=>newLoginPage(this),},);}else{r

widget - flutter : How to navigate to new page after state change?

状态改变后如何导航到新页面?我有一个需要先登录的应用程序。只有在登录后,应用程序组件才会完全创建。所以我写了这样的东西:主应用classAppComponentStateextendsStateimplementsCredentialProvider{Credentialcredential;@overrideWidgetbuild(BuildContextcontext){if(credential==null){returnnewMaterialApp(routes:{'/':(BuildContextcontext)=>newLoginPage(this),},);}else{r

java - Android,Volley Request,响应阻塞主线程

使用Volley处理大型响应时发生了一些不好的事情:Stringurl=AppHelper.DOMAIN+"/service/pages/profile_update.json";this.infoTextView.setText(getString(R.string.profile_info_updating));finalStringRequeststringRequest=newStringRequest(Request.Method.POST,url,newResponse.Listener(){@OverridepublicvoidonResponse(Stringrespo

android - 库 com.google.firebase :firebase-analytics is being requested by various other libraries

更新Firebase库时出现此错误:Thelibrarycom.google.firebase:firebase-analyticsisbeingrequestedbyvariousotherlibrariesat[[15.0.1,16.0.0),[16.0.1,16.0.1],[16.0.1,99999]],butresolvesto16.0.1.Disablethepluginandcheckyourdependenciestreeusing./gradlew:app:dependencies.依赖项是:implementation'com.google.firebase:fire

java - 如何解决 jsoup 错误 : unable to find valid certification path to requested target

我正在尝试解析以下URL的html:https://www.smuc.ac.kr/mbs/smuc/jsp/board/list.jsp?boardId=6993&id=smuc_040100000000我收到以下错误:sun.security.validator.ValidatorException:PKIXpathbuildingfailed:sun.security.provider.certpath.SunCertPathBuilderException:unabletofindvalidcertificationpathtorequestedtargetatsun.secur

android.database.CursorIndexOutOfBoundsException : Index -1 requested

我正在尝试使用RawContacts.entityIterator读取所有联系人,但我看到了这个错误:android.database.CursorIndexOutOfBoundsException:请求索引-1以下是我的代码:ContentResolvercr=getContentResolver();Cursorcur=cr.query(Contacts.CONTENT_URI,null,null,null,null);Stringid=cur.getString(cur.getColumnIndex(Contacts._ID));if(cur.getCount()>0){whil