Robotium test case with Gradle 0.9 and Android Studio, migration to Gradle 0.9 fail -


when installing android studio 0.5.1 received following message:

the project using unsupported version of android gradle plug-in (0.7.3). version 0.9.0 introduced incompatible changes in build language. please read migration guide learn how update project.

i have been trying migrate project , app works fine cannot robotium test cases run.

this have tried:

  1. changed build.gradle 0.7 0.9: classpath 'com.android.tools.build:gradle:0.9.+'
  2. updated gradle-wrapper.properties distributionurl=http\://services.gradle.org/distributions/gradle-1.9-all.zip distributionurl=http\://services.gradle.org/distributions/gradle-1.11-all.zip
  3. following guide @ http://tools.android.com/tech-docs/new-build-system/migrating_to_09 tells me rename testfolder androidtest , update test dependencies instrumenttestcompile androidtestcompile, using androidtestcompile 'com.jayway.android.robotium:robotium-solo:5.0.1'

my build.gradle file looks this

apply plugin: 'android'  sourcesets {     main {         java.srcdirs = ['src/main/java']         resources.srcdirs = ['src/main/res']     } }  android {     compilesdkversion 19     buildtoolsversion '19.0.2'     defaultconfig {         minsdkversion 11         targetsdkversion 19         versioncode 116         versionname "1.5.5"     }      defaultconfig {         testpackagename "com.foo.androidtest"     } }  dependencies {     compile 'com.android.support:support-v4:19.0.1'     compile 'com.android.support:appcompat-v7:19.0.1'     compile 'org.apache.commons:commons-lang3:3.0'     compile 'com.jayway.android.robotium:robotium-solo:5.0.1'      androidtestcompile 'com.jayway.android.robotium:robotium-solo:5.0.1' } 

i not know missing , when running is:

java.lang.noclassdeffounderror: com.foo.androidtest.testsimple$1 @ com.foo.androidtest.testsimple.setup(testsimple.java:47) @ android.test.androidtestrunner.runtest(androidtestrunner.java:191) @ android.test.androidtestrunner.runtest(androidtestrunner.java:176) @ android.test.instrumentationtestrunner.onstart(instrumentationtestrunner.java:554) @ android.app.instrumentation$instrumentationthread.run(instrumentation.java:1740) 

and in case wondering setup method looks this.

45:    public void setup() throws exception { 46:            solo = new solo(getinstrumentation(), getactivity()); 47:            falsecondition = new condition() { 48:                @override 49:                public boolean issatisfied() { 50:                    return false; 51:                } 52:            }; 53:    } 

i have not changed java-code, have done install android studio 0.5.1 , tried migrate gradle 0.9.

there off in 0.9 gradle tool version

src\instrumenttest\java - works on 0.8.+ gradle tool version src\androidtest\java - doesn't work on 0.9.+ gradle tool version


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -