安卓build时候遇到的一系列问题

本文详细解析了Android Studio中常见的编译错误,如找不到组件、配置过时、目标SDK版本声明不当等问题,并提供了相应的解决策略,帮助开发者快速定位并修复错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Plugin with id ‘com.android.application’ not found.
build.gradle 里缺少组建
Failed to open zip file.
gradle-wrapper.properties去掉s或者使用本地的
ViewPagerIndicatorLibrary’ could not be found in root
该开源控件无法引入
Execution failed for task ‘:processDebugResources’
目录符号问题
Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’ and ‘api’.
compile过时了给他换成implementation就行了
The targetSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file.
这个下面应该有自动解决方法的
no target device found
找不到真机,用usb宝盒
Task ‘assemble’ not found in root project
复制一个build.gradle
org.apache.http不存在
build.gradle中
在buildToolsVersion下边
defaultConfig上边

添加如下代码

useLibrary 'org.apache.http.legacy'



https://blog.youkuaiyun.com/dengweijunkedafu/article/details/80541104

未完待续,以上错误的根本原因不唯一,所以小伙伴们遇到的时候可以百度再谷歌,多试几种就会成功build

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值