草庐IT

WebSecurityConfigurerAdapter已弃用

全部标签

android - ProjectLayout.directoryProperty() 方法已被弃用

更新到gradle5.2.1之后DeprecatedGradlefeatureswereusedinthisbuild,makingitincompatiblewithGradle6.0.所以我运行./gradlew:app:clean--warning-modeall我在控制台中有警告:TheProjectLayout.directoryProperty()methodhasbeendeprecated.ThisisscheduledtoberemovedinGradle6.0.PleaseusetheObjectFactory.directoryProperty()methodin

android - GCM 在弃用后是否会为使用 GCM 的老客户提供新 token

这个问题在这里已经有了答案:DoIneedtomigrateGCMtoFCMonclientside?(2个答案)关闭3年前。Google已于2018年4月10日弃用GCM,根据文档,将在2019年4月11日之前停止支持GCM。关于这个话题有很多问答,有人提到旧代币将继续对现有用户有效,但我的问题是新用户是否能够获得新代币4月11日之后使用GCM?所以基本上我有一个使用旧gcm代码库发布的应用程序,使用旧版本的googleplay服务,分布在另一个市场(不是Play商店)。截至目前,安装获得了它们的GCMtoken并且它们按预期工作,在弃用后安装我的(旧)应用程序的新用户会发生什么?我

android - isMinifyEnabled() 已弃用。有什么选择?

我使用下面的代码根据产品口味自动生成proguard映射文件。buildTypes{release{minifyEnabledtrueshrinkResourcestrueproguardFilesgetDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'applicationVariants.all{variant->if(variant.getBuildType().isMinifyEnabled()){variant.assemble.doLast{copy{fromvariant.mappingFile

java - 已弃用 Httpclient

我正在开发一个使用HTTPclient进行数据传输的应用程序。由于HTTPClient已弃用,我想将网络部分移植到URLConnection。连接HttpClient.javapackageconexao;importjava.util.ArrayList;importjava.io.BufferedReader;importjava.io.IOException;importjava.io.InputStreamReader;importjava.net.URI;importorg.apache.http.client.HttpClient;importorg.apache.http

Android Notification.PRIORITY_MAX 已弃用 在顶部显示通知的替代方法是什么?

如何在顶部显示安卓通知?setPriority(Notification.PRIORITY_MAX)由于Notification.PRIORITY_MAX已弃用,有什么替代方案?NotificationCompat.Builderbuilder=newNotificationCompat.Builder(context).setContentIntent(pendingIntent).setSmallIcon(R.mipmap.ic_launcher).setContentTitle("NotificationTitle").setContentText("NotificationTe

android - FitnessActivities.getName(int i) 方法已弃用,使用什么方法代替?

在以下库中:com.google.android.gms:play-services-fitness:9.8.0在下面的类中:com.google.android.gms.fitness.FitnessActivities有这个方法:publicstaticjava.lang.StringgetName(inti)但是,在库com.google.android.gms:play-services-fitness:10.2.0中,上述方法已被删除。用什么方法代替上面提到的方法? 最佳答案 你能给我们一些代码吗?我假设你有一个值为X的变

java - startManagingCursor(cursor) 弃用方法

我使用了这段代码:Cursorc=cr.query(message,null,null,null,null);startManagingCursor(c);但是startManagingCursor(c)是一个已弃用的方法。我该如何更换它? 最佳答案 此方法已在API级别11中弃用。使用新的CursorLoader用LoaderManager上课反而;这也可以通过Android兼容包在旧平台上使用。查看thistutorialseries. 关于java-startManagingCur

java - org.apache.http.entity.FileEntity 在 Android 6 (Marshmallow) 中被弃用

我正在将应用程序升级到API23,其中org.apache.http已被弃用。我当前(已弃用)的代码如下所示:HttpClienthttpClient=newDefaultHttpClient();Filefile=newFile(attr.Value);Stringurl=server_url;HttpPostrequest=newHttpPost(url);FileEntityfileEntity=newFileEntity(file,"image/png");request.setEntity(fileEntity);HttpResponseresponse=httpClient

Android - 新的 BitmapDrawable 已弃用;替代 Bitmap.createBitmap 必须有 w/h > 0

我使用了PopupWindow。使用此PopupWindow,我将BackgroundDrawable设置为空的BitmapDrawable。当我使用下面的代码时,它会给出弃用警告:myPopupWindow.setBackgroundDrawable(newBitmapDrawable());所以我改成了:myPopupWindow.setBackgroundDrawable(newBitmapDrawable(getApplicationContext().getResources(),Bitmap.createBitmap(0,0,Bitmap.Config.ARGB_8888)

关于 PreferenceActivity 的 Android 弃用方法警告

当我尝试按照Android开发人员指南和教程使用首选项创build置Activity时,我收到如下警告:“不推荐使用PreferenceActivity类型的addPreferencesFromResource(int)方法”对于代码中的这两行:getPreferenceManager().setSharedPreferencesName(PREFS_NAME);addPreferencesFromResource(R.xml.default_values);我知道这些只是警告,但我想知道当我运行我正在设计的应用程序时,它们是否会在现在或将来引起任何问题。publicclassDefa