Robolectric 2.1 and Volley

304 views
Skip to first unread message

Greg Roodt

unread,
Jun 5, 2013, 5:09:51 AM6/5/13
to robol...@googlegroups.com
Im trying to use Robolectric 2.1 for some integration tests that make use of the new Google Volley HTTP library.

I get the following error when attempting to make a request:
Exception in thread "Thread-21" java.lang.NoClassDefFoundError: dalvik/system/SocketTagger
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
    at org.robolectric.bytecode.AsmInstrumentingClassLoader.findClass(AsmInstrumentingClassLoader.java:153)
    at org.robolectric.bytecode.AsmInstrumentingClassLoader.loadClass(AsmInstrumentingClassLoader.java:95)
    at android.net.TrafficStats.setThreadStatsTag(TrafficStats.java:124)
    at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:101)
Caused by: java.lang.ClassNotFoundException: dalvik.system.SocketTagger
    at org.robolectric.bytecode.AsmInstrumentingClassLoader.findClass(AsmInstrumentingClassLoader.java:119)
    at org.robolectric.bytecode.AsmInstrumentingClassLoader.loadClass(AsmInstrumentingClassLoader.java:95)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
    at org.robolectric.bytecode.AsmInstrumentingClassLoader.findClass(AsmInstrumentingClassLoader.java:153)
    at org.robolectric.bytecode.AsmInstrumentingClassLoader.loadClass(AsmInstrumentingClassLoader.java:95)
    at android.net.TrafficStats.$$robo$$TrafficStats_ff12_setThreadStatsTag(TrafficStats.java:124)
    at android.net.TrafficStats.setThreadStatsTag(TrafficStats.java)
    ... 1 more

Im guessing this means that Volley is not currently supported by Robolectric? Or has somebody got Robolectric working with Volley and the error is on my side?


Ryan Bateman

unread,
Jun 18, 2013, 8:22:44 AM6/18/13
to robol...@googlegroups.com
Anyone have any thoughts / experience on this?  

Jake Wharton

unread,
Jun 18, 2013, 10:58:02 AM6/18/13
to robol...@googlegroups.com
This should be fixed on master. Will go out as part of 2.2.

--
You received this message because you are subscribed to the Google Groups "Robolectric" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robolectric...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Tomáš Procházka

unread,
Aug 28, 2013, 2:07:35 AM8/28/13
to robol...@googlegroups.com
Exist any maven repository with SNAPSHOT builds please?

Dne úterý, 18. června 2013 16:58:02 UTC+2 Jake Wharton napsal(a):

Kirill Zotin

unread,
Aug 29, 2013, 11:24:15 AM8/29/13
to robol...@googlegroups.com
Git clone & local install.
Using 2.2-Snapshot is blocked by next issue:

Investigation in process...
Reply all
Reply to author
Forward
0 new messages