0

目前,我正在使用 SBT 构建一个 Scala + Android 应用程序。我宁愿不使用 Gradle。

我想使用 Google Play Services Location-Services API 来授予我 GPS 坐标。我不需要任何其他 Play 服务。但是,当我包含整个库时,它会超时并出现像这样的 OutOfMemory 错误,并且在线消息来源建议使用 Multidexing 作为该问题的解决方案。我根本不想那样做。没有必要。

所以,我对这里的这些说明感兴趣。在“Android Studio”部分,它提供了在库中为您的应用仅选择某些 API 的选项(例如 Wearables = compile 'com.google.android.gms:play-services-wearable:7.8.0', Fitness =编译“com.google.android.gms:play-services-fitness:7.8.0”等)。但是,在“其他”和“Eclipse”部分中,这是不存在的。

您如何选择只编译 Play Services 库的某些 API?不使用 Gradle + Android Studio 有可能吗?

4

1 回答 1

0
libraryDependencies += "com.google.android.gms"  % "play-services-wearable" % "7.8.0"

ETC

如果您在 dexing 时内存不足,请增加

dexMaxHeap in Android 
于 2015-08-28T03:10:30.490 回答