意思很直观:就是build的时候,Android()的参数错误。 更新android studio 后出现这种问题,主要是新版本的生成的app和module模版有所变化引起的。 Android S
意思很直观:就是build的时候,Android()的参数错误。
更新android studio 后出现这种问题,主要是新版本的生成的app和module模版有所变化引起的。
Android Studio Electric Eel | 2022.1.1 Patch 1
Build #ai-221.6008.13.2211.9514443, built on January 21, 2023
Runtime version: 11.0.15+0-b2043.56-8887301 x86_64
VM: Openjdk 64-Bit Server VM by JetBrains s.r.o.
MacOS 12.6.3
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4
ReGIStry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.instant.shutdown=false
apply plugin: ‘com.android.application’ 变化为
plugins { id 'com.android.application'}
一般情况是没有了’Version’字样,例如compileSdkVersion 变成了compileSdk
android {// namespace 'com.eagle.chatgpt' compileSdk 29 buildToolsVersion '30.0.1' defaultConfig { applicationId "com.eagle.chatgpt" minSdkVersion 24 targetSdkVersion 28 versionCode 1 versionName "1.0" }
同时这build.gradle中android节点中多了namespace参数
此时如果将gradle版本号降低,那么就出现了如题的问题,gradle版本号为低于7.4.1时就android() 是没有namespace参数的,此时将namespace去处,同时这manifest中添加package属性就正常了。
根据报错信息(行号)我们很容易找到android位置,将其中的属性都注释掉,一行行放开。哪个错再对应具体查找基本可以解决。
来源地址:https://blog.csdn.net/lanlangaogao/article/details/129023270
--结束END--
本文标题: No signature of method: build_*.android() is applicable for argument types
本文链接: https://www.lsjlt.com/news/397235.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-01-21
2023-10-28
2023-10-28
2023-10-27
2023-10-27
2023-10-27
2023-10-27
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0