java - build.gradle dependencies in android studio -
i developing app using sqliteassetshelper
in android studio , have seen 2 build.gradle
files. 1 in app folder , second in folder, in (project's name) folder build.gradle
file contains folowing
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.1.0' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } }
but saw examples mavencentral()
in repositories .. should have in build.gradle
file??.. second build.gradle
file in app folder contains following..
apply plugin: 'com.android.application' android { compilesdkversion 22 buildtoolsversion "21.1.2" defaultconfig { applicationid "com.appxone.practicesqliteassetshelper" minsdkversion 8 targetsdkversion 22 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.0.0' }
in github said use
compile `com.readystatesoftware.sqliteasset:sqliteassethelper:+`
in dependecies , use add jar file of sqliteassetshelper in lib folder.. im totally confuse in build.gradle , dependencies have add compile com.readystatesoftware.sqliteasset:sqliteassetshelper:+
statement.. , change jcenter()
mavencentral()
.. have used sqliteopenhelper
class give bunch of codes..and stackflow give me suggestion use sqliteassetshelper
..please me make assets/databases/mydb.db
should next..
you need add
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
into module build.gradle
file (usually it's called "app"), not in top-level build file. module build.gradle
should this:
apply plugin: 'com.android.application' android { compilesdkversion 22 buildtoolsversion "21.1.2" defaultconfig { applicationid "com.appxone.practicesqliteassetshelper" minsdkversion 8 targetsdkversion 22 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.0.0' compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+' }
edit: also, should change buildtoolsversion "21.1.2"
buildtoolsversion "22.0.1"
, i'd suggest use buildtoolsversion "23.0.1"
along targetsdkversion 23
, com.android.support:appcompat-v7:23.0.1
support latest android version.
Comments
Post a Comment