Gradle config file for L version and old versions of android -
i'm trying create android app new material design theme , can't work on previous versions of android.
i cant find resource correct configuration.
this gradle file:
apply plugin: 'com.android.application' android { buildtoolsversion '20' defaultconfig { applicationid "com.appname" versioncode 1 versionname "1.0" } buildtypes { release { runproguard false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } productflavors { l { compilesdkversion 'android-l' minsdkversion 'l' targetsdkversion 'l' } old { compilesdkversion 19 minsdkversion 11 targetsdkversion 19 } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:support-v4:21.0.0-rc1' }
}
the app crashes , cant find material design theme configuration (i've created theme in values-21 folder)
if can please me appreciate!
try this:
lpreview = hasproperty('lpreview') apply plugin: 'android' android { compilesdkversion lpreview ? "android-l" : 19 buildtoolsversion "20" productflavors { lpreview ? lpreview{} : classic{} } defaultconfig lpreview ? {} : { // non-l-preview configuration minsdkversion 14 targetsdkversion 19 } } dependencies { //wearapp project(':wearable') compile filetree(dir: 'libs', include: ['*.jar']) //compile 'com.android.support:support-v4:21.0.0-rc1' compile 'com.android.support:support-v4:20.+' }
Comments
Post a Comment