我有两个模块:我的应用程序模块,我想使用 Android 2.3 平台 进行编译,以及 ActionBarSherlock 库模块,它必须使用 Android 4.0 平台 进行编译>。当我以这种方式设置项目结构并运行应用程序时(并且 ActionBarSherlock 被设置为我的模块的依赖项)- IDEA 尝试使用 2.3 API 编译所有内容,并显示如下错误:
android-apt-compiler: action-bar-sherlock\res\values-v14\abs__themes.xml:32: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.Dialog'
如何正确设置IDEA?
最佳答案
您可以使用 4.0 库编译所有内容,但使用以下 list 声明支持 2.3:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
在示例中,17 是当前最新的 API 版本,但您可以使用 15 或任何您需要的版本。
关于android - 使用不同的 android API 编译不同的 android 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14521463/