java - unable to resolve static method junit assert -
I have tried to use both Junit 3.8 and 4 June 4. After reading in the Android docs, Android is not updated for Junit4 I. I am constantly getting this error for the I 3.8:
02-17 16: 37: 27.40 9: W / Delwick (32014): VFY: Unable to resolve static method 3467: Lorg / Junit / Asset; Conditional (Ljava / lang / String; Z) V
AndroidManifest.xml:
& lt ;? Xml version = "1.0" encoding = "UTF-8" & gt; & Lt; Manifest xmlns: Android = "http://schemas.android.com/apk/res/android" package = "com.kronosDev.nodeMud" Android: versionCode = "1" Android: versionName = "1.0" & gt; & Lt; Usage-permission Android: name = "android.permission.WRITE_EXTERNAL_STORAGE" /> & Lt; Use-sdk android: minSdkVersion = "8" Android: targetSdkVersion = "17" /> & Lt; Instrumentation Android: name = "android.test.InstrumentationTestRunner" Android: targetPackage = "com.kronosDev.nodeMud" Android: label = "chronos test" /> & Lt; Android Android: allowBackup = "true" android: icon = "@draubable / IC_Luncher" Android: label = "@ string / app_name" Android: Theme = "@ Style / Aaptim" & gt; & Lt; Use-Library Android: name = "android.test.runner" /> & Lt; Activity Android: name = "com.kronosDev.nodeMud.MainActivity" android: label = "@ string / app_name" & gt; & Lt; Intent-Filter & gt; & Lt; Action Android: name = "android.intent.action.MAIN" /> & Lt; Category android: name = "android.intent.category.LAUNCHER" /> & Lt; / Intent-Filter & gt; & Lt; / Activity & gt; & Lt; / Application & gt;
I have confirmed that junior 3.8 (and June 4) are on the way to building external JRs. I have tried to incorporate every jar individually without any result. My test code:
import static org.junit.Assert. *; Import java.util.HashMap; Import java.util.Map; Import janit Framework. TestSite; // import org.junit.Before; // import org.junit.Test; Import android.util.log; Public class nodod test test site {node root = null; Node a1 = null; Node a2 = null; Node a3 = null; Node a4 = null; // @ Exceptions before public wasted setup () {Log.i ("AAA", "Setup for nodes in testing"); // node a1 = node (node parent, string prompt, map & lt; string, node & gt; children); Maps & lt; String, node & gt; Kids = New Hashmop & lt; String, node & gt; (); Children.put ("a", a1); Children.put ("b", a2); Root = new node (empty, "stuff here", children); Children.clear (); // more code here Omitted for brevity} // @Test Public Zero Test () {Log.i ("AAA", "Test Running in Test Class"); AssertTrue ("up and running successfully", true); } // @ test folk-free testAdnode () {Log.i ("AAA", "in ad test node"); Emphasis ("Root number of correct children", 2, rootgate child (). Size ()); }}
What am I missing?
I think you should use Zenit.framework. You can take a look at this instead of Org.junit.Assert
Comments
Post a Comment