我有一个android项目,它使用几个库:
我曾经使用APKLIB打包,我能够生成我的项目的APK,但在Eclipse中有数百个错误。因此,我的意图是修复这个问题,因为它根本没有任何错误}:-)
我发现了AAR格式和所有这些分级人员,但我想继续使用我的maven结构。
因此,我得到了play_services的AAR包(多亏了https://github.com/mosabua/maven-android-sdk-deployer),并生成了appcompat-v7和其他库的AAR包。
我几乎做到了这一点,除了一些样式错误和那些仍然找不到的库中缺少的资源:
Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').
Error: No resource found that matches the given name (at 'theme' with value '@style/Theme.AppCompat.Light'). 这是我的一些依赖项的一个例子:
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services</artifactId>
<version>5.0.77</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v7-appcompat</artifactId>
<version>20.0.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v7-appcompat</artifactId>
<version>20.0.0</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v4</artifactId>
<version>20.0.0</version>
</dependency>我的问题是:
发布于 2014-08-08 15:37:16
移动到Gradle,它可能会使您为修复它所做的努力得到回报。这些新的谷歌库越来越适合Gradle。Android插件还不够成熟,无法像APKLIB以前那样很好地处理AAR文件,因此它可能需要很多小的调整。因此,如果是这样的话,我建议把这宝贵的时间用在Gradle身上。
注意:“移动到Gradle”并不一定意味着您必须切换到Android。您仍然可以使用Eclipse是一个很棒的IDE ;-)
https://stackoverflow.com/questions/24972833
复制相似问题