我最近升级了android studio但我无法找到android studio 3.1中报告的以下问题的来源:
Warning: The rule `-keep public class *extends java.lang.annotation.Annotation {
Run Code Online (Sandbox Code Playgroud)
这个警告似乎可能被切断,而且缺少信息.但它看起来像一个proguard问题,虽然我在构建调试变量时收到此警告.我检查了我的proguard文件,我没有完全匹配的行.我搜索了整个项目.关于根本原因的任何想法?
我不知道为什么但今天早上在我的手机上启动我的应用是不可能的.我收到此错误消息:
无法在单个dex文件中容纳所请求的类.尝试提供main-dex列表.
#methods:68061> 65536消息{kind = ERROR,text =无法在单个dex文件中容纳请求的类.尝试提供main-dex列表.
#methods:68061> 65536,sources = [未知源文件],工具
我是Android新手,我不明白这个问题,我需要做什么?为什么我现在而不是之前得到这个问题?
我在构建中遇到此错误“无法在单个 dex 文件中容纳请求的类(# 方法:72443 > 65536)”我试图添加 IBM 聊天机器人,但出现此错误。
我试图将 IBM 聊天机器人包含到应用程序中,并且我尝试实施 gson,但它仍然无法正常工作
Gradle 构建:模块
apply plugin: 'com.android.application'
ext {
bintrayRepo = 'maven'
bintrayName = 'chat-message-view'
publishedGroupId = 'me.himanshusoni.chatmessageview'
libraryName = 'chat-message-view'
artifact = 'chat-message-view'
libraryDescription = 'Android library to create chat message view easily'
siteUrl = 'https://github.com/himanshu-soni/ChatMessageView'
gitUrl = 'https://github.com/himanshu-soni/ChatMessageView.git'
libraryVersion = '1.0.7'
developerId = 'himanshu-soni'
developerName = 'Himanshu Soni'
developerEmail = 'himanshusoni.me@gmail.com'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
android { …Run Code Online (Sandbox Code Playgroud) 尝试在我们现有的Android应用中添加广告,在编译时我得到了这个:
Cannot fit requested classes in a single dex file. Try supplying a main-dex list.
Run Code Online (Sandbox Code Playgroud)
环顾四周,建议是减少播放服务的大小,这就是我所拥有的:
implementation 'com.google.android.gms:play-services-ads:12.0.1' // newly added
implementation 'com.google.android.gms:play-services:12.0.1'
Run Code Online (Sandbox Code Playgroud)
我在代码中使用Android Wear,所以当我减少到:
implementation 'com.google.android.gms:play-services-ads:12.0.1'
implementation 'com.google.android.gms:play-services-wearable:12.0.1'
Run Code Online (Sandbox Code Playgroud)
现在我得到了:
resource style/Theme.AppCompat (...) not found.
Run Code Online (Sandbox Code Playgroud)
我尝试添加
compile "com.android.support:appcompat-v7:21.0.+"
Run Code Online (Sandbox Code Playgroud)
我遇到了更多的冲突问题.什么是我最好的解决方案?我目前的解决方法是将AppCompat更改回Activity.非常感谢其他答案!
在 Api 22 和 Api 23 上运行时出错。24 和更高版本工作正常。任何想法为什么?互联网似乎还没有答案。
错误:类型 com.google.firebase.iid.zzav 被引用为来自 的接口com.google.firebase.messaging.zzd。