2015年2月18日 星期三

dependy Library Project.

http://stackoverflow.com/questions/27536491/how-to-import-android-project-as-library-and-not-compile-it-as-apk-android-stud
解决方案:
在Android工作室,你不能依赖一个Android应用程序模块(APK作为其输出)。你只能依赖于Java库(编译JAR)或Android库模块编译(AAR)


1.delete library project 's AndroidManifest.xml contents:

  android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"

and

applicationId  

2.import as moudule
3.
 
 
In library project's build.gradle file, you'll see a statement like this:
apply plugin: 'com.android.application'
which tells Gradle to build it as an application, generating an APK. If you change it to this:
apply plugin: 'com.android.library'



沒有留言:

張貼留言