You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

252 lines
14 KiB

D:\UAV\front\DroneRecognitionApp\app\build.gradle:12: Warning: Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES javadoc for details. [OldTargetApi]
targetSdk 33
~~~~~~~~~~~~
Explanation for issues of type "OldTargetApi":
When your application runs on a version of Android that is more recent than
your targetSdkVersion specifies that it has been tested with, various
compatibility modes kick in. This ensures that your application continues
to work, but it may look out of place. For example, if the targetSdkVersion
is less than 14, your app may get an option button in the UI.
To fix this issue, set the targetSdkVersion to the highest available value.
Then test your app to make sure everything works correctly. You may want to
consult the compatibility notes to see what changes apply to each version
you are adding support for:
https://developer.android.com/reference/android/os/Build.VERSION_CODES.html
as well as follow this guide:
https://developer.android.com/distribute/best-practices/develop/target-sdk.
html
https://developer.android.com/distribute/best-practices/develop/target-sdk.html
D:\UAV\front\DroneRecognitionApp\app\build.gradle:37: Warning: A newer version of com.google.android.material:material than 1.9.0 is available: 1.11.0 [GradleDependency]
implementation 'com.google.android.material:material:1.9.0'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\build.gradle:42: Warning: A newer version of androidx.camera:camera-core than 1.2.3 is available: 1.3.1 [GradleDependency]
implementation "androidx.camera:camera-core:${camerax_version}"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\build.gradle:43: Warning: A newer version of androidx.camera:camera-camera2 than 1.2.3 is available: 1.3.1 [GradleDependency]
implementation "androidx.camera:camera-camera2:${camerax_version}"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\build.gradle:44: Warning: A newer version of androidx.camera:camera-lifecycle than 1.2.3 is available: 1.3.1 [GradleDependency]
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\build.gradle:45: Warning: A newer version of androidx.camera:camera-view than 1.2.3 is available: 1.3.1 [GradleDependency]
implementation "androidx.camera:camera-view:${camerax_version}"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\build.gradle:48: Warning: A newer version of com.google.mlkit:barcode-scanning than 17.1.0 is available: 17.2.0 [GradleDependency]
implementation 'com.google.mlkit:barcode-scanning:17.1.0'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "GradleDependency":
This detector looks for usages of libraries where the version you are using
is not the current stable release. Using older versions is fine, and there
are cases where you deliberately want to stick with an older version.
However, you may simply not be aware that a more recent version is
available, and that is what this lint check helps find.
D:\UAV\front\DroneRecognitionApp\app\src\main\java\com\example\dronerecognition\RecognitionFragment.java:92: Error: This declaration is opt-in and its usage should be marked with @androidx.camera.core.ExperimentalGetImage or @OptIn(markerClass = androidx.camera.core.ExperimentalGetImage.class) [UnsafeOptInUsageError from androidx.annotation.experimental]
image.getImage(),
~~~~~~~~
Explanation for issues of type "UnsafeOptInUsageError":
This API has been flagged as opt-in with error-level severity.
Any declaration annotated with this marker is considered part of an
unstable or
otherwise non-standard API surface and its call sites should accept the
opt-in
aspect of it by using the @OptIn annotation, using the marker annotation
--
effectively causing further propagation of the opt-in aspect -- or
configuring
the UnsafeOptInUsageError check's options for project-wide opt-in.
To configure project-wide opt-in, specify the opt-in option value in
lint.xml
as a comma-delimited list of opted-in annotations:
<lint>
<issue id="UnsafeOptInUsageError">
<option name="opt-in" value="com.foo.ExperimentalBarAnnotation" />
</issue>
</lint>
Vendor: Android Open Source Project
Identifier: androidx.annotation.experimental
Feedback: https://issuetracker.google.com/issues/new?component=459778
D:\UAV\front\DroneRecognitionApp\app\src\main\AndroidManifest.xml:7: Error: Permission exists without corresponding hardware <uses-feature android:name="android.hardware.camera" required="false"> tag [PermissionImpliesUnsupportedChromeOsHardware]
<uses-permission android:name="android.permission.CAMERA" />
~~~~~~~~~~~~~~~
Explanation for issues of type "PermissionImpliesUnsupportedChromeOsHardware":
The <uses-permission> element should not require a permission that implies
an unsupported large screen hardware feature. Google Play assumes that
certain hardware related permissions indicate that the underlying hardware
features are required by default. To fix the issue, consider declaring the
corresponding <uses-feature> element with required="false" attribute.
https://developer.android.com/topic/arc/manifest.html#implied-features
D:\UAV\front\DroneRecognitionApp\app\src\main\res\values\colors.xml:3: Warning: The resource R.color.purple_200 appears to be unused [UnusedResources]
<color name="purple_200">#FFBB86FC</color>
~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\src\main\res\values\strings.xml:4: Warning: The resource R.string.recognition appears to be unused [UnusedResources]
<string name="recognition">识别</string>
~~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\src\main\res\values\strings.xml:5: Warning: The resource R.string.history appears to be unused [UnusedResources]
<string name="history">历史记录</string>
~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\src\main\res\values\strings.xml:6: Warning: The resource R.string.settings appears to be unused [UnusedResources]
<string name="settings">设置</string>
~~~~~~~~~~~~~~~
Explanation for issues of type "UnusedResources":
Unused resources make applications larger and slow down builds.
The unused resource check can ignore tests. If you want to include
resources that are only referenced from tests, consider packaging them in a
test source set instead.
You can include test sources in the unused resource check by setting the
system property lint.unused-resources.include-tests =true, and to exclude
them (usually for performance reasons), use
lint.unused-resources.exclude-tests =true.
,
D:\UAV\front\DroneRecognitionApp\app\src\main\res\mipmap-anydpi-v26\ic_launcher.xml:2: Warning: The application adaptive icon is missing a monochrome tag [MonochromeLauncherIcon]
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
^
D:\UAV\front\DroneRecognitionApp\app\src\main\res\mipmap-anydpi-v26\ic_launcher_round.xml:2: Warning: The application adaptive roundIcon is missing a monochrome tag [MonochromeLauncherIcon]
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
^
Explanation for issues of type "MonochromeLauncherIcon":
If android:roundIcon and android:icon are both in your manifest, you must
either remove the reference to android:roundIcon if it is not needed; or,
supply the monochrome icon in the drawable defined by the android:roundIcon
and android:icon attribute.
For example, if android:roundIcon and android:icon are both in the
manifest, a launcher might choose to use android:roundIcon over
android:icon to display the adaptive app icon. Therefore, your themed
application iconwill not show if your monochrome attribute is not also
specified in android:roundIcon.
D:\UAV\front\DroneRecognitionApp\app\src\main\res\layout\fragment_user.xml:16: Warning: Missing autofillHints attribute [Autofill]
<EditText
~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\src\main\res\layout\fragment_user.xml:24: Warning: Missing autofillHints attribute [Autofill]
<EditText
~~~~~~~~
Explanation for issues of type "Autofill":
Specify an autofillHints attribute when targeting SDK version 26 or higher
or explicitly specify that the view is not important for autofill. Your app
can help an autofill service classify the data correctly by providing the
meaning of each view that could be autofillable, such as views representing
usernames, passwords, credit card fields, email addresses, etc.
The hints can have any value, but it is recommended to use predefined
values like 'username' for a username or 'creditCardNumber' for a credit
card number. For a list of all predefined autofill hint constants, see the
AUTOFILL_HINT_ constants in the View reference at
https://developer.android.com/reference/android/view/View.html.
You can mark a view unimportant for autofill by specifying an
importantForAutofill attribute on that view or a parent view. See
https://developer.android.com/reference/android/view/View.html#setImportant
ForAutofill(int).
https://developer.android.com/guide/topics/text/autofill.html
D:\UAV\front\DroneRecognitionApp\app\src\main\res\layout\fragment_map.xml:6: Warning: Missing contentDescription attribute on image [ContentDescription]
<ImageView
~~~~~~~~~
Explanation for issues of type "ContentDescription":
Non-textual widgets like ImageViews and ImageButtons should use the
contentDescription attribute to specify a textual description of the widget
such that screen readers and other accessibility tools can adequately
describe the user interface.
Note that elements in application screens that are purely decorative and do
not provide any content or enable a user action should not have
accessibility content descriptions. In this case, set their descriptions to
@null. If your app's minSdkVersion is 16 or higher, you can instead set
these graphical elements' android:importantForAccessibility attributes to
no.
Note that for text fields, you should not set both the hint and the
contentDescription attributes since the hint will never be shown. Just set
the hint.
https://developer.android.com/guide/topics/ui/accessibility/apps#special-cases
D:\UAV\front\DroneRecognitionApp\app\src\main\java\com\example\dronerecognition\RecognitionFragment.java:101: Warning: Do not concatenate text displayed with setText. Use resource string with placeholders. [SetTextI18n]
resultText.setText("识别结果: " + rawValue);
~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "SetTextI18n":
When calling TextView#setText
* Never call Number#toString() to format numbers; it will not handle
fraction separators and locale-specific digits properly. Consider using
String#format with proper format specifications (%d or %f) instead.
* Do not pass a string literal (e.g. "Hello") to display text. Hardcoded
text can not be properly translated to other languages. Consider using
Android resource strings instead.
* Do not build messages by concatenating text chunks. Such messages can not
be properly translated.
https://developer.android.com/guide/topics/resources/localization.html
D:\UAV\front\DroneRecognitionApp\app\src\main\res\menu\bottom_navigation_menu.xml:6: Warning: Hardcoded string "地图", should use @string resource [HardcodedText]
android:title="地图" />
~~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\src\main\res\menu\bottom_navigation_menu.xml:10: Warning: Hardcoded string "识别", should use @string resource [HardcodedText]
android:title="识别" />
~~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\src\main\res\menu\bottom_navigation_menu.xml:14: Warning: Hardcoded string "历史", should use @string resource [HardcodedText]
android:title="历史" />
~~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\src\main\res\menu\bottom_navigation_menu.xml:18: Warning: Hardcoded string "用户", should use @string resource [HardcodedText]
android:title="用户" />
~~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\src\main\res\layout\fragment_recognition.xml:33: Warning: Hardcoded string "开始扫描", should use @string resource [HardcodedText]
android:text="开始扫描"
~~~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\src\main\res\layout\fragment_user.xml:11: Warning: Hardcoded string "用户登录", should use @string resource [HardcodedText]
android:text="用户登录"
~~~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\src\main\res\layout\fragment_user.xml:20: Warning: Hardcoded string "用户名", should use @string resource [HardcodedText]
android:hint="用户名"
~~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\src\main\res\layout\fragment_user.xml:28: Warning: Hardcoded string "密码", should use @string resource [HardcodedText]
android:hint="密码"
~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\src\main\res\layout\fragment_user.xml:36: Warning: Hardcoded string "登录", should use @string resource [HardcodedText]
android:text="登录"/>
~~~~~~~~~~~~~~~~~
D:\UAV\front\DroneRecognitionApp\app\src\main\res\layout\fragment_user.xml:42: Warning: Hardcoded string "退出登录", should use @string resource [HardcodedText]
android:text="退出登录"
~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "HardcodedText":
Hardcoding text attributes directly in layout files is bad for several
reasons:
* When creating configuration variations (for example for landscape or
portrait) you have to repeat the actual text (and keep it up to date when
making changes)
* The application cannot be translated to other languages by just adding
new translations for existing string resources.
There are quickfixes to automatically extract this hardcoded string into a
resource lookup.
2 errors, 27 warnings