Unity 接入Admob SDK 打Apk 过程中遇到的问题

2024-04-26 07:12

本文主要是介绍Unity 接入Admob SDK 打Apk 过程中遇到的问题,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

最近项目接入google Admod ,接入的过程比较顺利按照官网给的教程一步一步来就行,但是打包过程遇到了一些问题,记录如下:

Unity 版本:2023.3.4  Admob 版本:Version 9.1.0

第一个问题:

* What went wrong:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class _COROUTINE.ArtificialStackFrames found in modules jetified-kotlinx-coroutines-core-jvm-1.7.1.jar (org.jetbrains.kotlinx.kotlinx-coroutines-core-jvm-1.7.1.jar) and jetified-kotlinx-coroutines-core-jvm-1.7.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.1)
  Duplicate class _COROUTINE.CoroutineDebuggingKt found in modules jetified-kotlinx-coroutines-core-jvm-1.7.1.jar (org.jetbrains.kotlinx.kotlinx-coroutines-core-jvm-1.7.1.jar) and jetified-kotlinx-coroutines-core-jvm-1.7.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.1)
  Duplicate class _COROUTINE._BOUNDARY found in modules jetified-kotlinx-coroutines-core-jvm-1.7.1.jar (org.jetbrains.kotlinx.kotlinx-coroutines-core-jvm-1.7.1.jar) and jetified-kotlinx-coroutines-core-jvm-1.7.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.1)
  Duplicate class _COROUTINE._CREATION found in modules jetified-kotlinx-coroutines-core-jvm-1.7.1.jar (org.jetbrains.kotlinx.kotlinx-coroutines-core-jvm-1.7.1.jar) and jetified-kotlinx-coroutines-core-jvm-1.7.1.jar (org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.1)
  Duplicate class android.support.customtabs.ICustomTabsCallback found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.ICustomTabsCallback$Default found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.ICustomTabsCallback$Stub found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.ICustomTabsCallback$Stub$Proxy found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.ICustomTabsService found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.ICustomTabsService$Default found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.ICustomTabsService$Stub found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.ICustomTabsService$Stub$Proxy found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.IPostMessageService found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.IPostMessageService$Default found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.IPostMessageService$Stub found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.IPostMessageService$Stub$Proxy found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.trusted.ITrustedWebActivityCallback found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.trusted.ITrustedWebActivityCallback$Default found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.trusted.ITrustedWebActivityCallback$Stub found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.trusted.ITrustedWebActivityCallback$Stub$Proxy found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.trusted.ITrustedWebActivityService found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.trusted.ITrustedWebActivityService$Default found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.trusted.ITrustedWebActivityService$Stub found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.customtabs.trusted.ITrustedWebActivityService$Stub$Proxy found in modules browser-1.4.0-runtime.jar (androidx.browser:browser:1.4.0) and jetified-androidx.browser.browser-1.4.0-runtime.jar (:androidx.browser.browser-1.4.0:)
  Duplicate class android.support.v4.app.RemoteActionCompatParcelizer found in modules core-1.8.0-runtime.jar (androidx.core:core:1.8.0) and jetified-androidx.core.core-1.8.0-runtime.jar (:androidx.core.core-1.8.0:)
  Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules core-1.8.0-runtime.jar (androidx.core:core:1.8.0) and jetified-androidx.core.core-1.8.0-runtime.jar (:androidx.core.core-1.8.0:)
  Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.8.0-runtime.jar (androidx.core:core:1.8.0) and jetified-androidx.core.core-1.8.0-runtime.jar (:androidx.core.core-1.8.0:)
  Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.8.0-runtime.jar (androidx.core:core:1.8.0) and jetified-androidx.core.core-1.8.0-runtime.jar (:androidx.core.core-1.8.0:)
  Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.8.0-runtime.jar (androidx.core:core:1.8.0) and jetified-androidx.core.core-1.8.0-runtime.jar (:androidx.core.core-1.8.0:)
  Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.8.0-runtime.jar (androidx.core:core:1.8.0) and jetified-androidx.core.core-1.8.0-runtime.jar (:androidx.core.core-1.8.0:)
  Duplicate class androidx.activity.Cancellable found in modules jetified-activity-1.0.0-runtime.jar (androidx.activity:activity:1.0.0) and jetified-androidx.activity.activity-1.0.0-runtime.jar (:androidx.activity.activity-1.0.0:)
  Duplicate class androidx.activity.ComponentActivity found in modules jetified-activity-1.0.0-runtime.jar (androidx.activity:activity:1.0.0) and jetified-androidx.activity.activity-1.0.0-runtime.jar (:androidx.activity.activity-1.0.0:)
  Duplicate class androidx.activity.ComponentActivity$1 found in modules jetified-activity-1.0.0-runtime.jar (androidx.activity:activity:1.0.0) and jetified-androidx.activity.activity-1.0.0-runtime.jar (:androidx.activity.activity-1.0.0:)
  Duplicate class androidx.activity.ComponentActivity$2 found in modules jetified-activity-1.0.0-runtime.jar (androidx.activity:activity:1.0.0) and jetified-androidx.activity.activity-1.0.0-runtime.jar (:androidx.activity.activity-1.0.0:)
  Duplicate class androidx.activity.ComponentActivity$3 found in modules jetified-activity-1.0.0-runtime.jar (androidx.activity:activity:1.0.0) and jetified-androidx.activity.activity-1.0.0-runtime.jar (:androidx.activity.activity-1.0.0:)
  Duplicate class androidx.activity.ComponentActivity$NonConfigurationInstances found in modules jetified-activity-1.0.0-runtime.jar (androidx.activity:activity:1.0.0) and jetified-androidx.activity.activity-1.0.0-runtime.jar (:androidx.activity.activity-1.0.0:)
  Duplicate class androidx.activity.ImmLeaksCleaner found in modules jetified-activity-1.0.0-runtime.jar (androidx.activity:activity:1.0.0) and jetified-androidx.activity.activity-1.0.0-runtime.jar (:androidx.activity.activity-1.0.0:)
  Duplicate class androidx.activity.OnBackPressedCallback found in modules jetified-activity-1.0.0-runtime.jar (androidx.activity:activity:1.0.0) and jetified-androidx.activity.activity-1.0.0-runtime.jar (:androidx.activity.activity-1.0.0:)
  Duplicate class androidx.activity.OnBackPressedDispatcher found in modules jetified-activity-1.0.0-runtime.jar (androidx.activity:activity:1.0.0) and jetified-androidx.activity.activity-1.0.0-runtime.jar (:androidx.activity.activity-1.0.0:)
  Duplicate class androidx.activity.OnBackPressedDispatcher$LifecycleOnBackPressedCancellable found in modules jetified-activity-1.0.0-runtime.jar (androidx.activity:activity:1.0.0) and jetified-androidx.activity.activity-1.0.0-runtime.jar (:androidx.activity.activity-1.0.0:)
  Duplicate class androidx.activity.OnBackPressedDispatcher$OnBackPressedCancellable found in modules jetified-activity-1.0.0-runtime.jar (androidx.activity:activity:1.0.0) and jetified-androidx.activity.activity-1.0.0-runtime.jar (:androidx.activity.activity-1.0.0:)
  Duplicate class androidx.activity.OnBackPressedDispatcherOwner found in modules jetified-activity-1.0.0-runtime.jar (androidx.activity:activity:1.0.0) and jetified-androidx.activity.activity-1.0.0-runtime.jar (:androidx.activity.activity-1.0.0:)
  Duplicate class androidx.annotation.OptIn found in modules jetified-androidx.annotation.annotation-experimental-1.1.0-runtime.jar (:androidx.annotation.annotation-experimental-1.1.0:) and jetified-annotation-experimental-1.1.0-runtime.jar (androidx.annotation:annotation-experimental:1.1.0)
  Duplicate class androidx.annotation.RequiresOptIn found in modules jetified-androidx.annotation.annotation-experimental-1.1.0-runtime.jar (:androidx.annotation.annotation-experimental-1.1.0:) and jetified-annotation-experimental-1.1.0-runtime.jar (androidx.annotation:annotation-experimental:1.1.0)
  Duplicate class androidx.annotation.RequiresOptIn$Level found in modules jetified-androidx.annotation.annotation-experimental-1.1.0-runtime.jar (:androidx.annotation.annotation-experimental-1.1.0:) and jetified-annotation-experimental-1.1.0-runtime.jar (androidx.annotation:annotation-experimental:1.1.0)
  Duplicate class androidx.annotation.experimental.Experimental found in modules jetified-androidx.annotation.annotation-experimental-1.1.0-runtime.jar (:androidx.annotation.annotation-experimental-1.1.0:) and jetified-annotation-experimental-1.1.0-runtime.jar (androidx.annotation:annotation-experimental:1.1.0)
  Duplicate class androidx.annotation.experimental.Experimental$Level found in modules jetified-androidx.annotation.annotation-experimental-1.1.0-runtime.jar (:androidx.annotation.annotation-experimental-1.1.0:) and jetified-annotation-experimental-1.1.0-runtime.jar (androidx.annotation:annotation-experimental:1.1.0)
  Duplicate class androidx.annotation.experimental.UseExperimental found in modules jetified-androidx.annotation.annotation-experimental-1.1.0-runtime.jar (:androidx.annotation.annotation-experimental-1.1.0:) and jetified-annotation-experimental-1.1.0-runtime.jar (androidx.annotation:annotation-experimental:1.1.0)
  Duplicate class androidx.appcompat.app.ActionBar found in modules appcompat-1.2.0-runtime.jar (androidx.appcompat:appcompat:1.2.0) and jetified-androidx.appcompat.appcompat-1.2.0-runtime.jar (:androidx.appcompat.appcompat-1.2.0:)
  Duplicate class androidx.appcompat.app.ActionBar$DisplayOptions found in modules appcompat-1.2.0-runtime.jar (androidx.appcompat:appcompat:1.2.0) and jetified-androidx.appcompat.appcompat-1.2.0-runtime.jar (:androidx.appcompat.appcompat-1.2.0:)
  Duplicate class androidx.appcompat.app.ActionBar$LayoutParams found in modules appcompat-1.2.0-runtime.jar (androidx.appcompat:appcompat:1.2.0) and jetified-androidx.appcompat.appcompat-1.2.0-runtime.jar (:androidx.appcompat.appcompat-1.2.0:)
  Duplicate class androidx.appcompat.app.ActionBar$NavigationMode found in modules appcompat-1.2.0-runtime.jar (androidx.appcompat:appcompat:1.2.0) and jetified-androidx.appcompat.appcompat-1.2.0-runtime.jar (:androidx.appcompat.appcompat-1.2.0:)
  Duplicate class androidx.appcompat.app.ActionBar$OnMenuVisibilityListener found in modules appcompat-1.2.0-runtime.jar (androidx.appcompat:appcompat:1.2.0) and jetified-androidx.appcompat.appcompat-1.2.0-runtime.jar (:androidx.appcompat.appcompat-1.2.0:)
  Duplicate class androidx.appcompat.app.ActionBar$OnNavigationListener found in modules appcompat-1.2.0-runtime.jar (androidx.appcompat:appcompat:1.2.0) and jetified-androidx.appcompat.appcompat-1.2.0-runtime.jar (:<message truncated>
看着很多,其实主要是多个jar包问题,问题出在导入admob的过程中把jar包依赖自动下载到了Plugins/Android 目录下了,正常情况下这个目录如果只有admob的话应该是这样

处理方法:把其他的jar包删除就可以了。

Execution failed for task ':launcher:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:11: AAPT: error: attribute layout_constraintBottom_toBottomOf (aka com.*.*:layout_constraintBottom_toBottomOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:11: AAPT: error: attribute layout_constraintEnd_toEndOf (aka com.*.*:layout_constraintEnd_toEndOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:11: AAPT: error: attribute layout_constraintStart_toStartOf (aka com.*.*:layout_constraintStart_toStartOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:11: AAPT: error: attribute layout_constraintTop_toTopOf (aka com.*.*:layout_constraintTop_toTopOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:23: AAPT: error: attribute layout_constraintBottom_toTopOf (aka com.*.*:layout_constraintBottom_toTopOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:23: AAPT: error: attribute layout_constraintEnd_toEndOf (aka com.*.*:layout_constraintEnd_toEndOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:23: AAPT: error: attribute layout_constraintStart_toStartOf (aka com.*.*:layout_constraintStart_toStartOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:23: AAPT: error: attribute layout_constraintTop_toTopOf (aka com.*.*:layout_constraintTop_toTopOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:35: AAPT: error: attribute layout_constraintBottom_toTopOf (aka com.*.*:layout_constraintBottom_toTopOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:35: AAPT: error: attribute layout_constraintEnd_toEndOf (aka com.*.*:layout_constraintEnd_toEndOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:35: AAPT: error: attribute layout_constraintStart_toStartOf (aka com.*.*:layout_constraintStart_toStartOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:35: AAPT: error: attribute layout_constraintTop_toBottomOf (aka com.*.*:layout_constraintTop_toBottomOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:45: AAPT: error: attribute layout_constraintBottom_toBottomOf (aka com.*.*:layout_constraintBottom_toBottomOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:45: AAPT: error: attribute layout_constraintEnd_toEndOf (aka com.*.*:layout_constraintEnd_toEndOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:45: AAPT: error: attribute layout_constraintStart_toStartOf (aka com.*.*:layout_constraintStart_toStartOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:45: AAPT: error: attribute layout_constraintTop_toTopOf (aka com.*.*:layout_constraintTop_toTopOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:55: AAPT: error: attribute layout_constraintBottom_toBottomOf (aka com.*.*:layout_constraintBottom_toBottomOf) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:55: AAPT: error: attribute layout_constraintDimensionRatio (aka com.*.*:layout_constraintDimensionRatio) not found.
         
     C:\Users\DELL\.gradle\caches\transforms-3\246f528239708f672a9905dd9b6fadde\transformed\jetified-googlemobileads-unity\res\layout\gnt_medium_template_view.xml:55: AAPT: error: attribute layout_constraintEnd_toStartOf (aka com.*.*:layout_constraintEnd_toStartOf) not found.
         这个问题的原因是gradleTemplate.properties 没有设置android.useAndroidX=true,正常情况下gradleTemplate.properties内容为

点击Assets > External Dependency Manager > Android Resolver > Resolve 应该就能解决自动生成,如果没有,点击Force Resolve

还有就是打Apk过程中长时间的等待Building Gradle project... 如果超过20分钟可能就build失败了,大概问题是gradle 版本不对,我之前用的版本是6.1.1,报错,改为gradle-6.8 之后正常

最好引入Admob 打包的过程中开vpn,因为有些依赖需要翻墙,或者挂其他代理也行,网上教程比较多,可以查询下

遇到问题国外网站会有更多的解决方法,我百度了很久很多都不对症

这篇关于Unity 接入Admob SDK 打Apk 过程中遇到的问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/936918

相关文章

IDEA接入Deepseek的图文教程

《IDEA接入Deepseek的图文教程》在本篇文章中,我们将详细介绍如何在JetBrainsIDEA中使用Continue插件接入DeepSeek,让你的AI编程助手更智能,提高开发效率,感兴趣的小... 目录一、前置准备二、安装 Continue 插件三、配置 Continue 连接 DeepSeek四

Spring AI集成DeepSeek三步搞定Java智能应用的详细过程

《SpringAI集成DeepSeek三步搞定Java智能应用的详细过程》本文介绍了如何使用SpringAI集成DeepSeek,一个国内顶尖的多模态大模型,SpringAI提供了一套统一的接口,简... 目录DeepSeek 介绍Spring AI 是什么?Spring AI 的主要功能包括1、环境准备2

基于.NET编写工具类解决JSON乱码问题

《基于.NET编写工具类解决JSON乱码问题》在开发过程中,我们经常会遇到JSON数据处理的问题,尤其是在数据传输和解析过程中,很容易出现编码错误导致的乱码问题,下面我们就来编写一个.NET工具类来解... 目录问题背景核心原理工具类实现使用示例总结在开发过程中,我们经常会遇到jsON数据处理的问题,尤其是

SpringBoot集成图片验证码框架easy-captcha的详细过程

《SpringBoot集成图片验证码框架easy-captcha的详细过程》本文介绍了如何将Easy-Captcha框架集成到SpringBoot项目中,实现图片验证码功能,Easy-Captcha是... 目录SpringBoot集成图片验证码框架easy-captcha一、引言二、依赖三、代码1. Ea

springboot3.4和mybatis plus的版本问题的解决

《springboot3.4和mybatisplus的版本问题的解决》本文主要介绍了springboot3.4和mybatisplus的版本问题的解决,主要由于SpringBoot3.4与MyBat... 报错1:spring-boot-starter/3.4.0/spring-boot-starter-

在 Spring Boot 中使用异步线程时的 HttpServletRequest 复用问题记录

《在SpringBoot中使用异步线程时的HttpServletRequest复用问题记录》文章讨论了在SpringBoot中使用异步线程时,由于HttpServletRequest复用导致... 目录一、问题描述:异步线程操作导致请求复用时 Cookie 解析失败1. 场景背景2. 问题根源二、问题详细分

pycharm远程连接服务器运行pytorch的过程详解

《pycharm远程连接服务器运行pytorch的过程详解》:本文主要介绍在Linux环境下使用Anaconda管理不同版本的Python环境,并通过PyCharm远程连接服务器来运行PyTorc... 目录linux部署pytorch背景介绍Anaconda安装Linux安装pytorch虚拟环境安装cu

解读为什么@Autowired在属性上被警告,在setter方法上不被警告问题

《解读为什么@Autowired在属性上被警告,在setter方法上不被警告问题》在Spring开发中,@Autowired注解常用于实现依赖注入,它可以应用于类的属性、构造器或setter方法上,然... 目录1. 为什么 @Autowired 在属性上被警告?1.1 隐式依赖注入1.2 IDE 的警告:

SpringBoot快速接入OpenAI大模型的方法(JDK8)

《SpringBoot快速接入OpenAI大模型的方法(JDK8)》本文介绍了如何使用AI4J快速接入OpenAI大模型,并展示了如何实现流式与非流式的输出,以及对函数调用的使用,AI4J支持JDK8... 目录使用AI4J快速接入OpenAI大模型介绍AI4J-github快速使用创建SpringBoot

解决java.lang.NullPointerException问题(空指针异常)

《解决java.lang.NullPointerException问题(空指针异常)》本文详细介绍了Java中的NullPointerException异常及其常见原因,包括对象引用为null、数组元... 目录Java.lang.NullPointerException(空指针异常)NullPointer