问题描述
我不知道为什么但今天早上在我的手机上启动我的应用是不可能的。我收到此错误消息:
I don't know why but it's impossible to launch my app on my mobile this morning. I get this error message:
#methods:68061> 65536消息{kind = ERROR,text =无法在单个dex文件中容纳请求的类。尝试提供main-dex列表。
# methods: 68061 > 65536 Message{kind=ERROR, text=Cannot fit requested classes in a single dex file. Try supplying a main-dex list.
#methods:68061> 65536,sources = [未知源文件],工具
# methods: 68061 > 65536, sources=[Unknown source file], tool
我是Android新手,我不明白这个问题,我需要做什么?为什么我现在而不是之前遇到这个问题?
I'm really new to Android and I don't understand the problem and what I need to do? And why I get this problem now and not before?
推荐答案
在 build.gradle中添加依赖项
file:
implementation 'com.android.support:multidex:1.0.3'
在 build.gradle
的 defaultConfig
部分添加:
multiDexEnabled true
此处有更多详情:
这篇关于Android给出错误“无法在单个dex文件中容纳所请求的类”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!