简体   繁体   English

错误警告:PackageInfo 中的 [deprecation] 签名已被弃用 (Signature signature:info.signatures)

[英]Error warning: [deprecation] signatures in PackageInfo has been deprecated for(Signature signature:info.signatures)

I getting these errors while I'm compiling.我在编译时收到这些错误。

在此处输入图片说明

This is the log,这是日志,

> Task :app:compileDebugJavaWithJavac
C:\Users\HP\Desktop\FoodieRiderv1.0\FoodieRider1.1.1\FoodiesRider\app\src\main\java\com\foodies\rider\ActivitiesAndFragments\Activities\SplashScreenActivity.java:198: warning: [deprecation] FusedLocationApi in LocationServices has been deprecated
        mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);
                                        ^
C:\Users\HP\Desktop\FoodieRiderv1.0\FoodieRider1.1.1\FoodiesRider\app\src\main\java\com\foodies\rider\ActivitiesAndFragments\Activities\SplashScreenActivity.java:249: warning: [deprecation] isGooglePlayServicesAvailable(Context) in GooglePlayServicesUtil has been deprecated
                .isGooglePlayServicesAvailable(this);
                ^
C:\Users\HP\Desktop\FoodieRiderv1.0\FoodieRider1.1.1\FoodiesRider\app\src\main\java\com\foodies\rider\ActivitiesAndFragments\Activities\SplashScreenActivity.java:251: warning: [deprecation] isUserRecoverableError(int) in GooglePlayServicesUtil has been deprecated
            if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {
                                      ^
C:\Users\HP\Desktop\FoodieRiderv1.0\FoodieRider1.1.1\FoodiesRider\app\src\main\java\com\foodies\rider\ActivitiesAndFragments\Activities\SplashScreenActivity.java:252: warning: [deprecation] getErrorDialog(int,Activity,int) in GooglePlayServicesUtil has been deprecated
                GooglePlayServicesUtil.getErrorDialog(resultCode, this,
                                      ^
C:\Users\HP\Desktop\FoodieRiderv1.0\FoodieRider1.1.1\FoodiesRider\app\src\main\java\com\foodies\rider\ActivitiesAndFragments\Activities\SplashScreenActivity.java:426: warning: [deprecation] GET_SIGNATURES in PackageManager has been deprecated
            PackageInfo info = getPackageManager().getPackageInfo(getPackageName() , PackageManager.GET_SIGNATURES);
                                                                                                   ^
C:\Users\HP\Desktop\FoodieRiderv1.0\FoodieRider1.1.1\FoodiesRider\app\src\main\java\com\foodies\rider\ActivitiesAndFragments\Activities\SplashScreenActivity.java:427: warning: [deprecation] signatures in PackageInfo has been deprecated
            for(Signature signature:info.signatures)
                                        ^
6 warnings

Can someone please explain what it means?有人可以解释一下这是什么意思吗?

It means that those methods and classes have been Deprecated .这意味着这些方法和类已被弃用

The people who have provided the method or class are flagging that they intend to remove them in a future release of ... whatever library it is that is currently providing them.提供方法或类的人表示他们打算在未来版本中删除它们......无论当前提供它们的是什么库。 The warning is to tell you that you would be advised to modify this code to use alternatives to those methods.警告是要告诉您,建议您修改此代码以使用这些方法的替代方法。

Typically, the deprecation notice (in the javadocs) will suggest some alternatives.通常,弃用通知(在 javadoc 中)会建议一些替代方案。 For example the javadocs for GooglePlayServicesUtil.getErrorDialog says:例如, GooglePlayServicesUtil.getErrorDialogjavadocs说:

This method is deprecated.此方法已弃用。

Use getErrorDialog(Activity, int, int, OnCancelListener) instead.请改用getErrorDialog(Activity, int, int, OnCancelListener)

Note that these are only warnings.请注意,这些只是警告。 You can ignore them for the time being, though they may present problems in the future.您可以暂时忽略它们,尽管它们将来可能会出现问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 '签名:数组&lt;(out)签名。&gt;!' 已弃用。 在 Java 中已弃用 - 'signatures: Array<(out) Signature!>!' is deprecated. Deprecated in Java JAVA:Stripe webhook 错误:未找到与有效负载的预期签名匹配的签名 - JAVA: Stripe webhook error: No signatures found matching the expected signature for payload 具有Itext的多个签名-现有签名块存在问题 - Multiple signatures with Itext - issue with existing signature blocks 错误 TS2349:无法调用类型缺少调用签名的表达式。 类型 &#39;{ ; }&#39; 没有兼容的调用签名 - error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{ ; }' has no compatible call signatures 如何修复弃用警告,Firefox ProfilesIni 已在 java 中弃用 - How to fix a Deprecation Warning, Firefox ProfilesIni has been deprecated in java Android SDK 28 - PackageInfo 中的版本代码已被弃用 - Android SDK 28 - versionCode in PackageInfo has been deprecated Spring:无法确定正确的调用签名 - 多个过程/函数/签名 - Spring: Unable to determine the correct call signature - multiple procedures/functions/signatures Java ApachePDFBox 2 同一页面上的可视签名,第二个签名不可见 - Java ApachePDFBox 2 visual signatures on the same page, the second signature is not visible 如何将文件的签名与签名数据库进行比较? - How do I compare file's signature to a database of signatures? PDFBox Signatures:获取签名涵盖的页面范围 - PDFBox Signatures: Get range of pages which are covered by signature
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM