Note that there are some explanatory texts on larger screens.

plurals
  1. POError "could not find class 'android.support.v4.app.FragmentActivity' while launching activity
    text
    copied!<p>What steps will reproduce the problem?<br/> 1. Create a dummy AUT android native app with one activity.<br/> 2. Create the test robotium project <br/> 3. In the test project add "AndroidTestUtility.jar" file (not able to attach here) in libs folder along with robotium 3.6 jar file.<br/> 4. The "AndroidTestUtility.jar" handles the setup and tear down by itself.<br/> 5. Add similar code as below:<br/></p> <pre><code>private static final String TARGET_PACKAGE_ID ="com.sap.esm.retail"; private static final String LAUNCHER_ACTIVITY_FULL_CLASSNAME2 ="com.sap.esm.retail.MobileRetailingActivity"; // First Activity public InitialTest() throws ClassNotFoundException { super(TARGET_PACKAGE_ID,LAUNCHER_ACTIVITY_FULL_CLASSNAME2); } </code></pre> <p>6. Add a sample test method that the robotium would execute.<br/> 7. Run the android junit test.<br/> 8. Error message in logcat shown: <br/></p> <pre><code>Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.jayway.android.robotium.solo.Waiter.getSupportFragment </code></pre> <ol> <li>Error message in IDE shown :<br/> java.lang.NullPointerException</li> </ol> <p>What is the expected output? What do you see instead?<br/></p> <p>The test framework "AndroidTestUtility" is extended by the main class of the test robotium project.The expected output should have been the launch of the activity and the subsequent automated steps for it. Actualt output is that the activity is launched but no automated steps (solo statements) are executed. The error message is shown in the attached screenshots.</p> <p>What version of the product are you using? On what operating system?<br/> Windows 7 64bit, Android ADT bundle, Robotium 3.6 (checked on 3.4.1 also), Target: Android API 15</p> <p>Can anyone help me here ?</p> <p>Thanks and Regards,</p> <p>Abhishek</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload