【Unity打包Android】Gradle报错,Deprecated Gradle features were used in this build ···

news2024/11/14 18:28:33
Unity 2020.3.41f1c1 打包Android

加入Google Admob广告SDK后,打包Android失败,具体报错如下:

报错1:
Starting a Gradle Daemon, 2 stopped Daemons could not be reused, use --status for details

> Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
============================================================================
AppLovin Quality Service Plug-in for Gradle and Android Studio Version 5.4.4
Copyright (c) 2024 AppLovin Ltd. All rights reserved.
============================================================================

> Task :launcher:preBuild UP-TO-DATE
> Task :launcher:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:preBuild UP-TO-DATE
> Task :unityLibrary:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:compileReleaseAidl NO-SOURCE
> Task :launcher:generateReleaseBuildConfig UP-TO-DATE
> Task :launcher:compileReleaseAidl NO-SOURCE
> Task :launcher:compileReleaseRenderscript NO-SOURCE
> Task :launcher:javaPreCompileRelease UP-TO-DATE
> Task :launcher:generateReleaseResValues UP-TO-DATE
> Task :launcher:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:generateReleaseResources UP-TO-DATE
> Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
> Task :launcher:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
> Task :launcher:mergeReleaseResources UP-TO-DATE
> Task :launcher:prepareLintJar UP-TO-DATE
> Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
> Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
> Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
> Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
> Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
> Task :launcher:checkReleaseDuplicateClasses UP-TO-DATE
> Task :unityLibrary:compileReleaseShaders NO-SOURCE
> Task :unityLibrary:generateReleaseAssets UP-TO-DATE
> Task :launcher:mergeReleaseShaders UP-TO-DATE
> Task :launcher:compileReleaseShaders NO-SOURCE
> Task :launcher:generateReleaseAssets UP-TO-DATE
> Task :launcher:processReleaseJavaRes NO-SOURCE
> Task :launcher:mergeReleaseJniLibFolders
> Task :unityLibrary:packageReleaseAssets
> Task :unityLibrary:processReleaseJavaRes NO-SOURCE
> Task :unityLibrary:bundleLibResRelease NO-SOURCE
> Task :unityLibrary:processReleaseManifest
> Task :unityLibrary:generateReleaseRFile UP-TO-DATE
> Task :unityLibrary:compileReleaseJavaWithJavac UP-TO-DATE
> Task :unityLibrary:bundleLibCompileToJarRelease UP-TO-DATE
> Task :unityLibrary:bundleLibRuntimeToJarRelease UP-TO-DATE
> Task :unityLibrary:mergeReleaseJniLibFolders UP-TO-DATE
> Task :unityLibrary:mergeReleaseNativeLibs
> Task :unityLibrary:stripReleaseDebugSymbols
> Task :launcher:collectReleaseDependencies
> Task :unityLibrary:copyReleaseJniLibsProjectOnly
> Task :launcher:processReleaseManifest
> Task :launcher:processReleaseResources FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
32 actionable tasks: 9 executed, 23 up-to-date

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
报错2:
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: ??????????????? (uri:"", local:"extension-level")??????????????????<{}codename>,<{}layoutlib>,<{}api-level>
Warning: ??????????????? (uri:"", local:"base-extension")??????????????????<{}codename>,<{}layoutlib>,<{}api-level>

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':launcher:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     /Users/zcs/Desktop/AppLovin/Temp/gradleOut/unityLibrary/build/intermediates/library_manifest/release/AndroidManifest.xml:83:13-33: AAPT: error: unexpected element <property> found in <manifest><application>.
         

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 16s

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
报错3:
CommandInvokationFailure: Gradle build failed. 
/Applications/Unity/Hub/Editor/2020.3.41f1c1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath "/Applications/Unity/Hub/Editor/2020.3.41f1c1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

Environment Variables:
XPC_SERVICE_NAME = application.com.unity3d.unityhub.115064992.115064998
ORIGINAL_XDG_CURRENT_DESKTOP = undefined
XPC_FLAGS = 0x0
JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
PATH = /usr/local/opt/ruby/bin:/usr/local/bin:/usr/local/sbin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/zcs/.rvm/bin

TMPDIR = /var/folders/h0/fcqx86812z52g1cp20nnnk8r0000gn/T/
SHELL = /bin/zsh
SSH_AUTH_SOCK = /private/tmp/com.apple.launchd.pSygouVyl8/Listeners
HOME = /Users/zcs
__CFBundleIdentifier = com.unity3d.unityhub
USER = zcs
__CF_USER_TEXT_ENCODING = 0x1F5:0x19:0x34
LOGNAME = zcs
JAVA_HOME = /Applications/Unity/Hub/Editor/2020.3.41f1c1/PlaybackEngines/AndroidPlayer/OpenJDK
COMMAND_MODE = unix2003


stderr[
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: ??????????????? (uri:"", local:"extension-level")??????????????????<{}codename>,<{}layoutlib>,<{}api-level>
Warning: ??????????????? (uri:"", local:"base-extension")??????????????????<{}codename>,<{}layoutlib>,<{}api-level>

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':launcher:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     /Users/zcs/Desktop/AppLovin/Temp/gradleOut/unityLibrary/build/intermediates/library_manifest/release/AndroidManifest.xml:83:13-33: AAPT: error: unexpected element <property> found in <manifest><application>.
         

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 16s
]
stdout[
Starting a Gradle Daemon, 2 stopped Daemons could not be reused, use --status for details

> Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
============================================================================
AppLovin Quality Service Plug-in for Gradle and Android Studio Version 5.4.4
Copyright (c) 2024 AppLovin Ltd. All rights reserved.
============================================================================

> Task :launcher:preBuild UP-TO-DATE
> Task :launcher:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:preBuild UP-TO-DATE
> Task :unityLibrary:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:compileReleaseAidl NO-SOURCE
> Task :launcher:generateReleaseBuildConfig UP-TO-DATE
> Task :launcher:compileReleaseAidl NO-SOURCE
> Task :launcher:compileReleaseRenderscript NO-SOURCE
> Task :launcher:javaPreCompileRelease UP-TO-DATE
> Task :launcher:generateReleaseResValues UP-TO-DATE
> Task :launcher:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
> Task :unityLibrary:generateReleaseResources UP-TO-DATE
> Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
> Task :launcher:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
> Task :launcher:mergeReleaseResources UP-TO-DATE
> Task :launcher:prepareLintJar UP-TO-DATE
> Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
> Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
> Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
> Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
> Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
> Task :launcher:checkReleaseDuplicateClasses UP-TO-DATE
> Task :unityLibrary:compileReleaseShaders NO-SOURCE
> Task :unityLibrary:generateReleaseAssets UP-TO-DATE
> Task :launcher:mergeReleaseShaders UP-TO-DATE
> Task :launcher:compileReleaseShaders NO-SOURCE
> Task :launcher:generateReleaseAssets UP-TO-DATE
> Task :launcher:processReleaseJavaRes NO-SOURCE
> Task :launcher:mergeReleaseJniLibFolders
> Task :unityLibrary:packageReleaseAssets
> Task :unityLibrary:processReleaseJavaRes NO-SOURCE
> Task :unityLibrary:bundleLibResRelease NO-SOURCE
> Task :unityLibrary:processReleaseManifest
> Task :unityLibrary:generateReleaseRFile UP-TO-DATE
> Task :unityLibrary:compileReleaseJavaWithJavac UP-TO-DATE
> Task :unityLibrary:bundleLibCompileToJarRelease UP-TO-DATE
> Task :unityLibrary:bundleLibRuntimeToJarRelease UP-TO-DATE
> Task :unityLibrary:mergeReleaseJniLibFolders UP-TO-DATE
> Task :unityLibrary:mergeReleaseNativeLibs
> Task :unityLibrary:stripReleaseDebugSymbols
> Task :launcher:collectReleaseDependencies
> Task :unityLibrary:copyReleaseJniLibsProjectOnly
> Task :launcher:processReleaseManifest
> Task :launcher:processReleaseResources FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
32 actionable tasks: 9 executed, 23 up-to-date
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <7548ac0715314377a741890edb01278e>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <7548ac0715314377a741890edb01278e>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <7548ac0715314377a741890edb01278e>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <7548ac0715314377a741890edb01278e>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <7548ac0715314377a741890edb01278e>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <7548ac0715314377a741890edb01278e>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7548ac0715314377a741890edb01278e>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7548ac0715314377a741890edb01278e>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <7548ac0715314377a741890edb01278e>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <7548ac0715314377a741890edb01278e>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <7548ac0715314377a741890edb01278e>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <7548ac0715314377a741890edb01278e>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:337)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
 原因:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.

// 查看Unity预装的Gradle版本

https://docs.unity3d.com/Manual/android-gradle-overview.html

// 查看官方Gradle和Android Gradle Plugin兼容性https://developer.android.com/studio/releases/gradle-plugin#updating-gradle

Unity 2020.3.41f1c1默认Gradle版本是4.0.1,可在下图中查看,Admob中使用了新的Gradle特性,默认Gradle不支持,导致打包失败

解决:

 升级Gradle版本,或者升级Unity版本。

 升级Gradle

1. 自定义Gradle配置文件

1.1 Project Settings => Player => 勾选Custom Base Gradle Template、Custom Gradle Properties Template

Unity会在Assets/Plugins/Android路径生成Gradle文件,baseProjectTemplate.gradle、gradleTemplate.properties

1.2 勾选Use R8

不勾选会有以下报错:

* What went wrong:
A problem occurred evaluating project ':launcher'.
> Failed to apply plugin 'com.android.internal.application'.
   > com.android.builder.errors.EvalIssueException: The option 'android.enableR8' is deprecated.
     It was removed in version 7.0 of the Android Gradle plugin.
     Please remove it from `gradle.properties`.

 2. 修改Gradle plug-in 版本

打开Assets/Plugins/Android/baseProjectTemplate.gradle文件,修改Gradle plug-in版本号为7.3.0

3. 修改Gradle版本

3.1 下载对应版本的Gradle版本下载链接 Gradle | ReleasesFind binaries and reference documentation for current and past versions of Gradle.icon-default.png?t=N7T8https://gradle.org/releases/

3.2 Setting => Preferences => External Tools => 勾选Gradle Installed with Unity 

选择下载解压到本地Gradle文件夹

4. 修改JDK版本

4.1 下载安装对应版本的JDK

下载链接 Java Downloads | Oracleicon-default.png?t=N7T8https://www.oracle.com/java/technologies/downloads/#java11-mac

4.2 打开Assets/Plugins/Android/gradleTemplate.properties文件,修改新的JDK路径(绝对路径)

不需要勾选External Tools => JDK Installed with Unity,打包时会使用配置文件中的路径

org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=.unity3d**STREAMING_ASSETS**
# Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
**ADDITIONAL_PROPERTIES**
android.overridePathCheck=true
org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home
android.enableR8=**MINIFY_WITH_R_EIGHT**

 操作完成后即可开始打包~

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2039071.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Hutool找出对象修改前后的字段变化

首先Maven引入Hutool依赖&#xff1a; <dependency><groupId>cn.hutool</groupId><artifactId>hutool-all</artifactId><version>5.8.21</version> <!-- 请根据实际最新版本调整 --></dependency> 测试&#xff1a; 1…

OpenAI API error: “Unrecognized request argument supplied“

题意&#xff1a;OpenAI API 错误&#xff1a;‘提供了无法识别的请求参数’ 问题背景&#xff1a; Im receiving an error when calling the OpenAI API. Its not recognizing file argument, which I submitted to the API. 我在调用 OpenAI API 时遇到错误。API 不识别我提…

python语言day6 os random datetime .ini文件

os&#xff1a; 获取运行当前py文件的绝对路径&#xff1a; abspath中添加路径&#xff0c;会直接和绝对路径拼接。 folder_path os.path.abspath("") print(folder_path) 路径拼接&#xff1a; mac系统路径&#xff1a;file/TranslucentTB win系统路径&#xff1a;…

日撸Java三百行(day23:使用具有通用性的队列)

目录 前言 一、基础知识准备 1.Object类 2.Integer类 2.1包装类 2.2装箱和拆箱 2.3Integer类的常见方法 二、代码实现 1.队列创建及初始化 2.方法创建 3.数据测试 4.完整的程序代码 总结 前言 在昨天&#xff0c;我们使用了两个队列来辅助完成二叉树的“压缩顺序…

Android gradle 构建

Understanding Tasks - Gradle task kapt 是 Kotlin 语言的注解处理器&#xff0c;它是 Android Studio 中用于处理 Kotlin 注解的工具。它通过在编译期间生成代码来增强 Kotlin 代码的功能。需要 Kotlin 编译器来解析和处理注解&#xff1b;使用 APT 来生成代码&#xff0c…

【通天星主动安全监控云平台信息泄露漏洞】

目录 一、漏洞简介 二、资产测绘 三、poc利用 四、脚本批量验证 一、漏洞简介 “通天星主动安全监控云平台”是一个基于云计算技术的安全监控平台&#xff0c;通常用于保障网络安全、工业控制系统安全或物联网设备的安全。该信息泄露漏洞位于接口&#xff1a;/808gps/Stand…

可移植性(兼容性)测试指南

可移植性是指应用程序能够安装到不同的环境中&#xff0c;在不同的环境中使用&#xff0c;甚至可以移动到不同的环境中。当然&#xff0c;前两者对所有系统都很重要。就PC软件而言&#xff0c;鉴于操作系统、共存和互操作应用程序、硬件、带宽可用性等方面的快速变化&#xff0…

JavaScript秒值转换为年月日时间字符串

当前效果&#xff1a; 因为后端传递过来的是秒值&#xff0c;显示的时候也是秒值。 但是这种不太友好&#xff0c;所以需要转换为 “xxxx年xx月xx日 xx:xx:xx” 的格式。 参考代码&#xff1a; formatDate (now) {const date new Date(now)var y date.getFullYear() // 年…

Springboot3 自定义全局异常与异常捕获

全局异常构建 package com.lingyang.system.util.exception;import lombok.Getter;/*** author **文* Description:* createDate 2024/8/8 15:20**/ Getter public class TokenErrotException extends RuntimeException{private final String errorMessage;public TokenErrotE…

三维点云深度网络 PointNeXt 源码阅读 (III) —— 骨干网络模型

Title: 三维点云深度网络 PointNeXt 源码阅读 (III) —— 骨干网络模型 (BaseSeg、PointNextEncoder、PointNextDecoder、SetAbstraction 和 FeaturePropogation) 文章目录 前言I. 整体模型 —— Tier 01. 模型对象的建立2. BaseSeg 模型类 II. 编码器与解码器 —— Tier 11. P…

基于区块链的金融凭证应用开发

基于区块链的金融凭证应用开发 这个项目旨在开发一个基于区块链技术的金融凭证应用平台,用于提升供应链金融中应收账款管理的效率和透明度。通过将应收账款资产上链,并利用智能合约实现债权凭证的转让与拆分,项目目标是降低融资成本、增强信用分析能力,并推动供应链金融的…

昂科烧录器支持Cmsemicon中微半导体的8位微控制器CMS79F1239

芯片烧录行业领导者-昂科技术近日发布最新的烧录软件更新及新增支持的芯片型号列表&#xff0c;其中Cmsemicon中微半导体的8位微控制器CMS79F1239已经被昂科的通用烧录平台AP8000所支持。 CMS79F1239为中微半导体自主8位RISC内核单片机&#xff0c;工作电压1.8V~5.5V&#xff…

JSONP解决前端跨域学习案例

JSONP 的工作原理 JSONP利用的是 前端代码&#xff1a; <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><ti…

性能测试-性能测试工具wrk,Apache ab,ngrinder,locust,jmeter和loadrunner

性能测试工具&#xff1a; 企业中主流性能测试工具&#xff1a; jmeter jmeter&#xff1a; java开发的开源&#xff0c;线程、学习很低&#xff0c;接口、自动化、性能测试、第三方性能测试从jmeter扩展 loadrunner&#xff1a; 商业 loadrunner&#xff08;录播&#xff09;…

商业环境洞察:PEST分析法全解析

PEST 分析法是什么 PEST 分析作为一种企业战略规划中的关键工具&#xff0c;主要用于评估企业所处的宏观环境。"P"代表政治因素&#xff0c;涉及政府政策、法律法规及其对企业运营的潜在影响。"E"指的是经济环境&#xff0c;包括经济增长、汇率波动、通货…

[ Python 原理分析 ]如何实现用户实现博客文章点赞-物联网Python

目录 一、前言 二、Python爬虫 三、详细操作 3.1 建立基本工程 3.2 获取文章列表 3.2.1 找到获取文章请求 3.2.2 分析获取请求 3.2.3 构建获取请求 3.2.4 调试打印 3.3 实现点赞操作 3.3.1 判断点赞状态 3.3.2 找到点赞请求 3.2.3 分析点赞请求 3.2.4 构建点赞请…

linxu命令diff:比较两个或多个文件的内容差异的工具diff详解

目录 一、概述 二、用法 1、基本语法 2、基本用法 3、常用选项 4、获取帮助 三、输出格式 1、正常格式&#xff08;normal diff&#xff09; 2、上下文格式&#xff08;context diff&#xff09; 3、合并格式&#xff08;unified diff&#xff09; 四、示例…