Reputation: 893
Is there a standard way to convert a java library in Android Studio to an android library?
Upvotes: 3
Views: 1307
Reputation: 893
Steps :
apply plugin: 'java-library'
to apply plugin: 'com.android.library'
and add the following : android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
Open in Android Studio and the module should load as an Android Library.
Upvotes: 3