Friday 15 February 2013

android - How to include RxAndroid in project? -



android - How to include RxAndroid in project? -

i'm using android studio. how can include rxandroid in project subproject? want build sourcecode. i've tried: -include git submodule. -included in projects settings.gradle file, "include ':rxandroid', ':app'"

then get: error:unable find module gradle path ':rxandroid'.

edit

my folder construction follows.

project -app -rxandroid

edit 2

i changed folder name rxandroid rxandroid. changed name in projects settings.gradle, still same error.

according http://tools.android.com/tech-docs/new-build-system/user-guide#toc-multi-project-setup should work changing settings.gradle to:

include ':app', ':rxandroid'

and work me. setup is

android studio 0.8.13 rxandroid cloned https://github.com/reactivex/rxandroid my project using com.android.tools.build:gradle:0.12.+

edit:

i should mention i'm still running gradle 1.12. created new blank project in android studio, added rxandroid settings.gradle, , build error appeared:

error:cause: startup failed: not instantiate global transform class org.spockframework.compiler.spocktransform specified @ jar:file:/path/spock-core/0.7-groovy-1.8/3a677d19e8d3acf3bd296c4023356256d55da5a3/spock-core-0.7-groovy-1.8.jar!/meta-inf/services/org.codehaus.groovy.transform.asttransformation because of exception org.spockframework.util.incompatiblegroovyversionexception: spock compiler plugin cannot execute because spock 0.7.0-groovy-1.8 not compatible groovy 2.3.6. more information, see http://versioninfo.spockframework.org spock location: file:/path/spock-core-0.7-groovy-1.8.jar groovy location: file:/path/gradle-2.1/lib/groovy-all-2.3.6.jar

it seems rxandroid depends on spock 0.7-groovy-1.8 won't work groovy 2.3.6 of gradle 2.1. , latest com.android.tools.build (0.13.x) requires gradle 2.1.

so did following:

in top level build.gradle (not app one) alter project's dependency on com.android.tools.build 0.12.+ change gradle version in gradle-wrapper.properties 1.12

now project built successfully.

android rx-java

No comments:

Post a Comment