【问题标题】:Use multiDexEnabled without Gradle but Eclipse build process instead使用 multiDexEnabled 而不使用 Gradle,而是使用 Eclipse 构建过程
【发布时间】:2015-01-01 09:14:22
【问题描述】:

由于最新的 SDK 版本,创建具有多个 dex 文件 (https://developer.android.com/tools/building/multidex.html) 的应用程序变得更加简单,我的问题是,当我不使用 Gradle 进行构建过程但使用“旧” Eclipse 构建链?

Gradle 构建文件中的“multiDexEnabled true”必须也可以通过其他方式传输到 Android 编译器?

【问题讨论】:

  • 解决办法是什么?
  • 我还没有找到:/
  • 这里有一个使用 ANT 的方法:stackoverflow.com/questions/27903059/…
  • 现在他们加快了构建系统并在 Android Studio 中支持 NDK,我建议切换到新系统

标签: android eclipse android-gradle-plugin dex android-multidex


【解决方案1】:

我也遇到过同样的问题。 所以我使用以下解决方法。已将 'android-support-multidex' 添加到 lib 文件夹并以下一步方式更新 gradle 中的 'dependecices' 标签

dependencies {
compile fileTree(dir: 'libs', include: '*.jar', exclude: 'android-support-multidex.jar')
compile 'com.android.support:multidex:1.0.1'}

我希望这对你有用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-01
    • 2020-01-31
    • 1970-01-01
    相关资源
    最近更新 更多