小编Gue*_*997的帖子

Android Studio 3.0 canary - 无法解析:org.apache.httpcomponents:httpclient:4.0.1

我安装了AS 3.0 Canary,导入了一个现有项目,并且在运行gradle sync时,我遇到了这个错误:

Failed to resolve: org.apache.httpcomponents:httpclient:4.0.1
Run Code Online (Sandbox Code Playgroud)

我尝试清理项目,但也失败了.这是错误的一部分:

Required by:
     project :app > com.google.api-client:google-api-client-android:1.22.0 > com.google.http-client:google-http-client-android:1.22.0 > com.google.http-client:google-http-client:1.22.0
Run Code Online (Sandbox Code Playgroud)

我查看了其他问题,似乎httpclient在API 23中被弃用了.但是这些问题中提出的每个解决方案似乎都不起作用.

更令人困惑的是,它在AS 2.4预览版7中完美运行,targetSdkVersion并且compileSdkVersion都设置为25.

编辑:我尝试在稳定版本的AS上运行它,它似乎工作正常.但我需要在预览版本上使用较新的模拟器.

android gradle android-gradle-plugin

11
推荐指数
2
解决办法
2574
查看次数

PHP内置Web服务器运行速度非常慢

我是 PHP 的初学者,正在制作一个网站,在网页上显示 Linux 系统的基本系统信息(CPU 使用情况、内存使用情况等)。对于 Web 服务器,我使用内置的 Web 服务器:

php -S 192.168.1.36:8000
Run Code Online (Sandbox Code Playgroud)

前端使用Bootstrap和JS。我正在使用的 php 脚本使用服务器发送事件(从此处了解它)将 CPU 使用情况、内存使用情况和磁盘使用情况(它从 shell_exec() 方法获取这些信息)发送到前端,大约每 2 秒一次。

问题是,该网站的刷新速度非常慢,有时,第一次加载也非常慢。当我查看 JS 控制台时,我注意到即使在我按下刷新按钮后,服务器仍在将数据流式传输到网页。难道是因为连接尚未关闭?

php webserver shell-exec server-sent-events

5
推荐指数
1
解决办法
3863
查看次数

生成签名APK时的Proguard错误

我在build.gradle文件中将minifyEnabled设置为true.在为我的应用生成已签名的APK时,我遇到了很多错误:

Warning:com.dropbox.core.http.OkHttp3Requestor$AsyncCallback: can't find superclass or interface okhttp3.Callback
Warning:com.dropbox.core.http.OkHttp3Requestor$PipedRequestBody: can't find superclass or interface okhttp3.RequestBody
Warning:com.dropbox.core.http.OkHttpRequestor$AsyncCallback: can't find superclass or interface com.squareup.okhttp.Callback
Warning:com.dropbox.core.http.OkHttpRequestor$PipedRequestBody: can't find superclass or interface com.squareup.okhttp.RequestBody
Warning:com.dropbox.core.DbxStandardSessionStore: can't find referenced class javax.servlet.http.HttpSession
Warning:com.dropbox.core.http.GoogleAppEngineRequestor: can't find referenced class com.google.appengine.api.urlfetch.URLFetchServiceFactory
Warning:com.dropbox.core.http.GoogleAppEngineRequestor: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
Warning:com.dropbox.core.http.GoogleAppEngineRequestor: can't find referenced class com.google.appengine.api.urlfetch.URLFetchService
Warning:com.dropbox.core.http.GoogleAppEngineRequestor: can't find referenced class com.google.appengine.api.urlfetch.HTTPMethod
Warning:com.dropbox.core.http.GoogleAppEngineRequestor: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
Warning:com.dropbox.core.http.GoogleAppEngineRequestor: can't find referenced class com.google.appengine.api.urlfetch.HTTPHeader
Warning:com.dropbox.core.http.GoogleAppEngineRequestor: can't find referenced class com.google.appengine.api.urlfetch.HTTPRequest
Warning:com.dropbox.core.http.GoogleAppEngineRequestor: can't find …
Run Code Online (Sandbox Code Playgroud)

android android-proguard

5
推荐指数
1
解决办法
1926
查看次数

Google Drive Rest API v3 - 如何将文件移动到垃圾箱?

Google Drive Rest API v3 有一个 Drive.Files.Delete 方法,但这会永久删除文件。如何将文件移至垃圾箱?

我查看了更新文件元数据的文档,我尝试这样做,但似乎不起作用:

File file = new File();
file.setTrashed(true);
driveService.files().update(f.getId(), file).execute();
Run Code Online (Sandbox Code Playgroud)

android google-api-java-client google-drive-api

1
推荐指数
1
解决办法
4150
查看次数