当前位置: 首页 > news >正文

上饶网站建设兼职新郑网络推广

上饶网站建设兼职,新郑网络推广,深圳市政府官网,摄影网站设计代码targetSdkVersion 改成 33 ,遇到一些坑。 需要注意的地方: 修改 targetSdkVersion 为 33。AndroidManifest.xml 里添加 android:exported“true”升级 Gradle 版本。升级第三方库。 修改 app 的 build.gradle , android {compileSdkVersi…

targetSdkVersion 改成 33 ,遇到一些坑。

需要注意的地方:

  • 修改 targetSdkVersion 为 33。
  • AndroidManifest.xml 里添加 android:exported=“true”
  • 升级 Gradle 版本。
  • 升级第三方库。

修改 app 的 build.gradle

android {compileSdkVersion 33defaultConfig {targetSdkVersion 33}
}

修改 AndroidManifest.xml ,为 activity 、service 等四大组件配置 android:exported="true"

编译报错,提示

We recommend using a newer Android Gradle plugin to use compileSdk = 33This Android Gradle plugin (7.1.1) was tested up to compileSdk = 32This warning can be suppressed by addingandroid.suppressUnsupportedCompileSdk=33
to this project's gradle.propertiesThe build will continue, but you are strongly encouraged to update your project to
use a newer Android Gradle Plugin that has been tested with compileSdk = 33

需要升级 Gradle 版本,修改 project 的 build.gradle

buildscript {repositories {google()mavenCentral()}dependencies {//classpath "com.android.tools.build:gradle:7.1.1"classpath "com.android.tools.build:gradle:7.4.2"// NOTE: Do not place your application dependencies here; they belong// in the individual module build.gradle files}
}

修改 gradle-wrapper.properties ,使用 gradle-7.5-bin.zip ,

#Thu Aug 08 18:55:44 CST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

编译OK,功能验证报错,

java.lang.IllegalArgumentException: com.xxx: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.at android.app.PendingIntent.checkFlags(PendingIntent.java:401)at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:671)at android.app.PendingIntent.getBroadcast(PendingIntent.java:658)at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:273)at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:151)at androidx.work.impl.utils.ForceStopRunnable.forceStopRunnable(ForceStopRunnable.java:171)at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:102)at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)

wtf ? 我都没有使用 PendingIntent 。

多次尝试后,最后发现是导入了第三方库导致的。

解决办法:更新第三方库。 旧版本的第三方库可能没有做 targetSdkVersion 33 的适配。

http://www.hkea.cn/news/818942/

相关文章:

  • 佛山企业网站制作今日热点新闻事件
  • 企业网站网络推广黑帽seo培训
  • 欧美做的爱爱网站有哪些广告推广赚钱
  • 泉州网站建设工作室谷歌seo价格
  • 国建设委员会网站百度推广一天烧几千
  • 做网站 花园路国贸营销推广方案包括哪些内容
  • 做商城网站哪里买口碑营销属于什么营销
  • 鞋子 东莞网站建设真正的免费建站在这里
  • 网站上微信的链接怎么做项目平台
  • 做网站后有人抢注关键词网络营销方案策划论文
  • 苏州网站建设网站seo优化的方法
  • 设计网装修seo顾问服
  • 网站ip拦截免费网站搭建平台
  • 深圳企业网站建设公司快速申请免费个人网站
  • 唯品会 一家专门做特卖的网站沈阳seo按天计费
  • 聊城手机网站建设郑州seo服务技术
  • 个人定做衣服店江门seo推广公司
  • 网站开发与网站建设山东济南seo整站优化费用
  • 香港疫情最新消息今天深圳seo教程
  • 维护一个网站难吗免费发布外链
  • 南安市网站建设成都今天重大新闻事件
  • 网站后台补丁如何做软文有哪几种类型
  • 网站建设的费用包括哪些内容资讯门户类网站有哪些
  • 一站式服务图片制作网页的基本步骤
  • 个人网站建设网站网络网站推广
  • asp做的药店网站模板北京百度快照推广公司
  • 网站建设泉州效率网络seo的优化策略有哪些
  • 页网站无锡网站制作推广
  • 一流的龙岗网站建设目前最靠谱的推广平台
  • 企业营销型网站费用短视频推广引流