报错信息:

Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.

意思是构建工具31版本已中断,使用SDK管理器移除并且重新安装

解决方案:

在【Project Structure】选项中,【Module】

在这里回退30版本稳定的,小版本也要更改:

如果没有,要先去下载这个版本的SDK

报错信息:

Manifest merger failed : 
Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported`
when the corresponding component has an intent filter defined.

See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

解决参考地址:

https://blog.csdn.net/lyabc123456/article/details/117232115

就是在那个标签上面需要设置这个约束属性:

<service android:name="com.example.app.backgroundService"
android:exported="false"
>
<intent-filter>
<action android:name="com.example.app.START_BACKGROUND" />
</intent-filter>
</service>

原生构建的项目【清单文件】是没有这个的:

<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapplication"> <application android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MyApplication">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application> </manifest>

现在加上去之后立刻构建正常。。。

【Android】构建Android12项目报错的更多相关文章

  1. 利用Eclipse中的Maven构建Web项目报错(一)

    利用Eclipse中的Maven构建Web项目 1.在进行上述操作时,pom.xml一直报错 <project xmlns="http://maven.apache.org/POM/4 ...

  2. 【Android】 导入项目报错的解决方案

    1.打项目的properties -->android 为其指一个运版本, 2.修改default properties 文件 ,改相应版本等级 3.选中项目,单击右键,选中properties ...

  3. IDEA_构建Maven项目报错(1)

    构建报错: [ERROR] Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or one of its dependenc ...

  4. 利用Eclipse中的Maven构建Web项目报错(二)

    利用Eclipse中的Maven构建Web项目 1.错误描述 [INFO] Scanning for projects... [INFO] [INFO] Using the builder org.a ...

  5. Android Studio运行项目报错:Error:null value in entry: annotationProcessorOutputFolder=null的解决方案

    一般是在Android studio异常退出(比如强制关机)后,重新打开后运行项目出现该问题. 解决方案 删除项目根目录的.gradle文件夹,然后Clean  Project —— Rebulid ...

  6. MyEclipse构建maven项目报错

    直接上图: 这里有三种方案: 1.检查jdk版本:最好换成1.8版本 项目右键-->build path-->configure build Path; 1.2  点击 libraries ...

  7. 【Android Studio】之构建项目报错

    问题1: 报错: Could not download fastutil.jar (it.unimi.dsi:fastutil:7.2.0): No cached version available ...

  8. 安卓开发第一记 android stdio 安装后 新建测试项目报错

    Failed to resolve:com.android.support:appcompat-v7:报错处理   你在使用android studio时是否也出现过上图的报错,你还在为它的出现烦恼? ...

  9. Android无法删除项目+导入项目报错

    Android无法删除项目+导入项目报错 Android无法删除项目:关闭eclipse或关闭电脑,然后重启,继续删除就可以了 导入项目报错:右键–>配置–>中就可以看到了,更改一下就可以 ...

  10. [原]Jenkins(八)---jenkins构建项目报错时发送错误报告邮件

    /** * lihaibo * 文章内容都是根据自己工作情况实践得出. * 版权声明:本博客欢迎转发,但请保留原作者信息! http://www.cnblogs.com/horizonli/p/533 ...

随机推荐

  1. 查看SO KO 执行程序相关信息命令

    1 查看SO 查看so库的方法__臣本布衣_新浪博客 (sina.com.cn) 1.nm -D libxxx.so 打印出符号信息. 一般这样用:nm -D libxxx.so |grep T $ ...

  2. Qt-ui的简单使用,常用控件(2)

    1  简介 本文主要介绍Qt ui界面的简单使用,介绍一些常用的控件. 参考视频:https://www.bilibili.com/video/BV1XW411x7NU?p=22 2  常用控件 常用 ...

  3. windows 命令行调整跃点数

    先用 route print -4 命令找到接口号: 接口列表10...00 ff 51 c4 53 b4 ......TAP-Windows Adapter V918...18 c0 4d 29 5 ...

  4. Ton 区块链的官方 类ERC20-Token 智能合约代码-Transfer部分解析

    作者:林冠宏 / 指尖下的幽灵.转载者,请: 务必标明出处. 掘金:https://juejin.im/user/1785262612681997 GitHub : https://github.co ...

  5. vue双曲线

    原型 1 <template> 2 <div :class="className" :style="{height:height,width:width ...

  6. work05

    第一题:分析以下需求,并用代码实现 手机类Phone 属性: 品牌brand 价格price 行为: 打电话call() 发短信sendMessage() 玩游戏playGame() 要求: 1.按照 ...

  7. js沙雕排序之睡眠排序&随机排序

    1.睡眠排序,只要睡的时间多少就可以排序出来不要在乎时间多少 var arr=[4,77,741,41,142,52,244]; var sleepSort=function(arr,callback ...

  8. spring jpa restful请求示例

    创建项目 导入jar包mysql 数据库和连接池jar <dependency> <groupId>org.springframework.boot</groupId&g ...

  9. 如何查看docker容器的volume挂载情况

    准备在docker容器当中编写个日常维护的脚本,但容器里连yum和vim命令都没有,所以就想到通过容器映射在本机的volume里编写脚本这样在容器中不就可以直接用了吗,那么在这之前你首先得知道dock ...

  10. 《DNK210使用指南 -CanMV版 V1.0》第一章 本书学习方法

    第一章 本书学习方法 1)实验平台:正点原子DNK210开发板 2)章节摘自[正点原子]DNK210使用指南 - CanMV版 V1.0 3)购买链接:https://detail.tmall.com ...