Eclipse exported project in Android Studio and add remote dependency in build.gradle -
i have exported android project in eclipse gradle build files, , imported in android studio.
i have updated android studio today v0.6.0 built on june 05, 2014.
as remote dependency have added appcompat dependencies works fine expected.
compile 'com.android.support:appcompat-v7:19.+'
but when try add other libraries such smoothprogressbar
, actionbarsherlock
, nineoldandroids
, etc, fails. when run app shows following in gradle build tab:
error:a problem occurred configuring root project 'myapp'. > not resolve dependencies configuration ':_debugcompile'. > not find com.github.castorflex.smoothprogressbar:library:0.5.1. required by: :myapp:unspecified
and when sync project gradle file, shows following in gradle sync tab:
error:com.github.castorflex.smoothprogressbar:library:0.5.1 (double-click here find usages.)
i tried empty new project , add remote dependency mentioned libraries(sherlock , etc) worked expected. i guess missed in build.gradle
or other solution?
buildscript { repositories { mavencentral() } dependencies { classpath 'com.android.tools.build:gradle:0.11.+' } } apply plugin: 'android' dependencies { compile filetree(dir: 'libs', include: '*.jar') compile 'com.github.castorflex.smoothprogressbar:library:0.5.1' compile 'com.android.support:appcompat-v7:19.+' } android { compilesdkversion 19 buildtoolsversion "19.1.0" sourcesets { main { manifest.srcfile 'androidmanifest.xml' java.srcdirs = ['src'] resources.srcdirs = ['src'] aidl.srcdirs = ['src'] renderscript.srcdirs = ['src'] res.srcdirs = ['res'] assets.srcdirs = ['assets'] } // move tests tests/java, tests/res, etc... instrumenttest.setroot('tests') // move build types build-types/<type> // instance, build-types/debug/java, build-types/debug/androidmanifest.xml, ... // moves them out of them default location under src/<type>/... // conflict src/ being used main source set. // adding new build types or product flavors should accompanied // similar customization. debug.setroot('build-types/debug') release.setroot('build-types/release') } }
add code build.gradle
repositories { mavencentral() }
update explain answer: resolve dependencies, have indicate in gradle script repositories used. can use more repositories...
with support libs
(support , support-compact) not necessary, because android plugin searches in androidrepository
, googlerepository
downloaded sdk manager.
Comments
Post a Comment