My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
GettingStartedAndroid  
How to build the NativeDriver server and client libraries and run the sample tests.
Featured
Updated Jun 5, 2011 by matv...@google.com

Requirements

After installing the Android SDK, you may want to put the platform-tools directory in your PATH environment variable, so you can run adb easily.

Build the NativeDriver libraries

Check-out the repository with SVN if you have not done so already:

$ svn checkout https://nativedriver.googlecode.com/svn/trunk nativedriver --username {Google account e-mail address}

The repository that will be downloaded is organized in this manner:

nativedriver
  |
  |__android
  |     |__src
  |     |__sample-aut (sample app under test)
  |     |__test (sample test cases that test the sample app under test)
  |
  |__third_party (all the dependencies we need)

Next use ant to build the NativeDriver libraries:

$ cd nativedriver/android
$ ant

The libraries are built and stored in the nativedriver/android/build directory:

  • server-standalone.jar - this should be linked to your Android application, and runs on the Android device (or emulator). This is the NativeDriver server, and listens for requests to automate the application, such as “start an activity” or “click a UI element”
  • client-standalone.jar - this should be linked to the test, which is the NativeDriver client. It implements a WebDriver API which communicates with the server.

These two jar packages are represented by the yellow and green components below - yellow is code that is reused from Selenium WebDriver. Green is original code from NativeDriver.

Import the NativeDriver Sample Projects Into Eclipse

  1. Start Eclipse
  2. Click the File -> Import... menu item.
  3. Select Existing Projects into Workspace in the General category and click Next
  4. Click Select root directory and then click Browse...
  5. Open the nativedriver/android/sample-aut/simplelayouts directory in the repository you downloaded
  6. Confirm your screen looks like the below image and click Finish. Repeat the import process for the nativedriver/android/test directory.

The android-test project you imported contains sample tests written with Android NativeDriver that also serve to test Android NativeDriver itself. The simplelayouts project is an Android app that the sample tests run against.

Install the simplelayouts app to your device (or emulator)

One easy way to do this is to run the app from Eclipse by right-clicking on the simplelayouts project, then selecting Run As->Android Application.

You can also run this command:

adb install nativedriver/android/sample-aut/simplelayouts/bin/simplelayouts.apk

Prepare the Android device to receive NativeDriver requests

In the future these steps should be done through code, maybe using an extended AdbConnection class. For now, this part must be done manually:

  1. At a command-prompt, run this command:

    adb shell am instrument com.google.android.testing.nativedriver.simplelayouts/com.google.android.testing.nativedriver.server.ServerInstrumentation

    This restarts the app with instrumentation enabled. The NativeDriver ServerInstrumentation class listens for requests to drive the app on a device port in a JSON Wire Protocol, which is almost identical to that protocol used by Selenium WebDriver

  2. Enable port forwarding to bind the device port to a port on your PC. This allows the NativeDriver client to communicate with the device through a normal TCP connection.

    adb forward tcp:54129 tcp:54129

    You can confirm that the instrumentation is started by running adb logcat and looking for a line like this:

    I/com.google.android.testing.nativedriver.server.ServerInstrumentation(  273): Jetty started on port 54129

Run the tests

  1. Right-click one of the three test classes in the android-test project
  2. Select Run As->JUnit Test.
  3. Specify the Eclipse JUnit Launcher as the Preferred Launcher.
  4. Watch the device screen to see the magic!

Comment by niloy.c...@gmail.com, Jul 12, 2011
i am trying to log in in my emulator by android webdriver to gmail. suppose i set up user name = aaaa and password = bbb.i set them as
To to do that my code is as follows:

public void testGoogle() throws Exception {
AndroidDriver? driver = new AndroidDriver?();
// And now use this to visit Gmail driver.get("http://gmail.com");
driver.findElement(By.id("Email")).sendKeys("sample@live.com"); driver.findElement(By.name("Passwd")).sendKeys("111111"); driver.findElement(By.name(".save")).click();
(new WebDriverWait?(driver, 5)).until(new ExpectedCondition?<Boolean>() {
public Boolean apply(WebDriver? d) {
return d.getTitle().startsWith("cheese!");
}
});
//Thread.sleep(50000); // Check the title of the page //System.out.println("Page title is: " + driver.getTitle()); driver.quit();

}

But when i am running this code then android webdriver fill up in to the password text box with both the value as defined and always failing to log in.

what is the problem in this ??

I would be really thankful to you if you show me the way t solve it.

Comment by niloy.c...@gmail.com, Jul 12, 2011
am trying to log in in my emulator by android webdriver to gmail. suppose i set up user name = aaaa and password = bbb.i set them as
To to do that my code is as follows:

public void testGoogle() throws Exception {
AndroidDriver? driver = new AndroidDriver?();
// And now use this to visit Gmail driver.get("http://gmail.com");
driver.findElement(By.id("Email")).sendKeys("sample@live.com"); driver.findElement(By.name("Passwd")).sendKeys("111111"); driver.findElement(By.name(".save")).click();
(new WebDriverWait?(driver, 5)).until(new ExpectedCondition?<Boolean>() {
public Boolean apply(WebDriver? d) {
return d.getTitle().startsWith("cheese!");
}
});
//Thread.sleep(50000); // Check the title of the page //System.out.println("Page title is: " + driver.getTitle()); driver.quit();

}

But when i am running this code then android webdriver fill up in to the password text box with both the value as defined and always failing to log in. But it should fill up the username first and then password 2ndly. But this is buting the password and username value in the password textbox.

what is the problem in this ??

I would be really thankful to you if you show me the way t solve it.

Comment by chenfei1...@gmail.com, Jul 12, 2011

maybe your user name = aaaa and password = bbb is too short

Comment by kongqing...@163.com, Jul 14, 2011

to:niloy.c...@gmail.com i also have this problem when i login android application. makesure the mouse focus on textbox before use sendKeys ,so try this driver.findElement(By.id("Email")).click(); driver.findElement(By.id("Email")).sendKeys("sample@live.com"); driver.findElement(By.name("Passwd")).click(); driver.findElement(By.name("Passwd")).sendKeys("111111");

Comment by niloy....@gmail.com, Jul 15, 2011

@Thank you friends. i have solved my problem yesterday. this was happening for for my selenium server was outdated.

are u guys are doing native android application testing by android driver ?

normally we use driver.get("http://google.com"); to load the web in the in the android webdriver inside the device/ emulator.

but if i want to lunch one native application (example: google map) which is install in my device or in my emulator. so to lunch this application in the android driver what command / codei have to write there ??

Comment by masud.t...@gmail.com, Jul 15, 2011

i am also looking forward this answer. do you guys know how to do it ?

Comment by hotdude...@gmail.com, Jul 17, 2011

@niloy u can use robotium which is similar as selenium to test on native apps ...

Comment by project member d...@google.com, Jul 17, 2011

To @niloy. Just to clarify, although the naming is a bit confusing, AndroidDriver? is different from NativeDriver?. NativeDriver? is an implementation of the WebDriver? API which drives of the UI of a native application rather than a web application (for which you might want to use AndroidDriver?). For more information about AndroidDriver?, you might want to refer to http://code.google.com/p/selenium/wiki/AndroidDriver. Thank you.

Comment by project member d...@google.com, Jul 17, 2011

To @niloy. Regarding "but if i want to lunch one native application (example: google map) which is install in my device or in my emulator. so to lunch this application in the android driver what command / codei have to write there ??", please refer to http://code.google.com/p/nativedriver/wiki/AndroidMakeAnAppTestable. However, NativeDriver? is not able to automate the pre-installed apps like google maps without source code.

Comment by hotdude...@gmail.com, Jul 17, 2011

Hi Guys,

i have a problem in building the project , i have created a Android Test Project and i have linked all the required jars to it ..

my program looks like this

package com.android.nativedriver; import junit.framework.TestCase?;

import org.openqa.selenium.By; import org.openqa.selenium.ScreenOrientation?;

import com.google.android.testing.nativedriver.client.AndroidNativeDriver?; import com.google.android.testing.nativedriver.client.AndroidNativeDriverBuilder?; import com.google.android.testing.nativedriver.client.AndroidNativeElement?;

public class Sample extends TestCase? {

private com.google.android.testing.nativedriver.client.AndroidNativeDriver? driver;
@Override protected void setUp() {
driver = getDriver();
}
@Override protected void tearDown() {
driver.quit();
} //com.google.android.testing.nativedriver.simplelayouts protected AndroidNativeDriver? getDriver() {
return new AndroidNativeDriverBuilder?().withDefaultServer().build();
}

private void map() {
driver.startActivity("com.google.android.maps.MapsActivity?");
}
public void openmap(){
map(); AndroidNativeElement? btn= driver.findElement(By.id("btn_header_places")); btn.click(); driver.navigate().back(); driver.rotate(ScreenOrientation?.LANDSCAPE);
} }

i get an error in the console :

UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException?: already added: Lcom/google/android/testing/nativedriver/common/AndroidCapabilities?; [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.dx.dex.file.ClassDefsSection?.add(ClassDefsSection?.java:123) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.dx.dex.file.DexFile?.add(DexFile?.java:143) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.dx.command.dexer.Main.processClass(Main.java:372) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.dx.command.dexer.Main.processFileBytes(Main.java:346) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.dx.command.dexer.Main.access$400(Main.java:59) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:294) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.dx.cf.direct.ClassPathOpener?.processArchive(ClassPathOpener?.java:244) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.dx.cf.direct.ClassPathOpener?.processOne(ClassPathOpener?.java:130) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.dx.cf.direct.ClassPathOpener?.process(ClassPathOpener?.java:108) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.dx.command.dexer.Main.processOne(Main.java:313) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.dx.command.dexer.Main.processAllFiles(Main.java:233) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.dx.command.dexer.Main.run(Main.java:185) [2011-07-18 12:25:52 - Nativedriver] Dx at sun.reflect.NativeMethodAccessorImpl?.invoke0(Native Method) [2011-07-18 12:25:52 - Nativedriver] Dx at sun.reflect.NativeMethodAccessorImpl?.invoke(NativeMethodAccessorImpl?.java:39) [2011-07-18 12:25:52 - Nativedriver] Dx at sun.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:25) [2011-07-18 12:25:52 - Nativedriver] Dx at java.lang.reflect.Method.invoke(Method.java:597) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.ide.eclipse.adt.internal.build.DexWrapper?.run(DexWrapper?.java:179) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.ide.eclipse.adt.internal.build.BuildHelper?.executeDx(BuildHelper?.java:652) [2011-07-18 12:25:52 - Nativedriver] Dx at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder?.build(PostCompilerBuilder?.java:510) [2011-07-18 12:25:52 - Nativedriver] Dx at org.eclipse.core.internal.events.BuildManager?$2.run(BuildManager?.java:629) [2011-07-18 12:25:52 - Nativedriver] Dx at org.eclipse.core.runtime.SafeRunner?.run(SafeRunner?.java:42) [2011-07-18 12:25:52 - Nativedriver] Dx at org.eclipse.core.internal.events.BuildManager?.basicBuild(BuildManager?.java:172) [2011-07-18 12:25:52 - Nativedriver] Dx at org.eclipse.core.internal.events.BuildManager?.basicBuild(BuildManager?.java:203) [2011-07-18 12:25:52 - Nativedriver] Dx at org.eclipse.core.internal.events.BuildManager?$1.run(BuildManager?.java:255) [2011-07-18 12:25:52 - Nativedriver] Dx at org.eclipse.core.runtime.SafeRunner?.run(SafeRunner?.java:42) [2011-07-18 12:25:52 - Nativedriver] Dx at org.eclipse.core.internal.events.BuildManager?.basicBuild(BuildManager?.java:258) [2011-07-18 12:25:52 - Nativedriver] Dx at org.eclipse.core.internal.events.BuildManager?.basicBuildLoop(BuildManager?.java:311) [2011-07-18 12:25:52 - Nativedriver] Dx at org.eclipse.core.internal.events.BuildManager?.build(BuildManager?.java:343) [2011-07-18 12:25:52 - Nativedriver] Dx at org.eclipse.core.internal.events.AutoBuildJob?.doBuild(AutoBuildJob?.java:144) [2011-07-18 12:25:52 - Nativedriver] Dx at org.eclipse.core.internal.events.AutoBuildJob?.run(AutoBuildJob?.java:242) [2011-07-18 12:25:52 - Nativedriver] Dx at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) [2011-07-18 12:25:52 - Nativedriver] Dx 1 error; aborting [2011-07-18 12:25:52 - Nativedriver] Conversion to Dalvik format failed with error 1

what does this mean .. where am i going wrong ..

Comment by yongd...@shopximity.com, Jul 22, 2011

Looking at the examples and slides, it looks like the test cases are in JUnit Java code. Does NativeDriver? support any kind of scripting for test cases? Thanks!

Comment by niloy.c...@gmail.com, Jul 27, 2011

@hotdude: your set up is not ok.

Comment by hy...@163.com, Aug 1, 2011

How can I get Toast in app using "Find" mothed?

Comment by aabouta...@gmail.com, Aug 2, 2011

Hello,

I am trying to find an UI element in a webview but it is not working and an exception that the item is not found is thrown. I am sure the element exist. Is this feature supported? Please check my code below.

WebElement? element = driver.findElementByClassName("android.webkit.WebView?"); WebElement? newElement = element.findElement(By.id("username"));

Thanks, Ahmed

Comment by duynguye...@gmail.com, Sep 20, 2011

Hi all! I'm trying to write test demo NativeDriver?, but when i build, it have on error. This is my code: import com.google.android.testing.nativedriver.client.AndroidNativeDriver?; import com.google.android.testing.nativedriver.client.AndroidNativeDriverBuilder?; import com.google.android.testing.nativedriver.client.AndroidNativeElement?; import org.openqa.selenium.; import junit.framework.; //import android.test.InstrumentationTestCase?; public class TestNativeOSs extends TestCase? {

public void test(){
AndroidNativeDriver? driver = new AndroidNativeDriverBuilder?()
.withDefaultServer() .build();
driver.startActivity("com.google.android.testing.nativedriver.simplelayouts .TextValueActivity?");
AndroidNativeElement? b = driver.findElement(By.id("@+id/
EditText01?"));
b.sendKeys("1"); driver.navigate().back();
}
}

And this is error: java.lang.NoClassDefFoundError?: com.google.android.testing.nativedriver.client.AndroidNativeDriverBuilder? at com.google.android.testing.nativedriver.simplelayouts.test.TestNativeOSs.te st(TestNativeOSs.java: 12) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.AndroidTestRunner?.runTest(AndroidTestRunner?.java:169) at android.test.AndroidTestRunner?.runTest(AndroidTestRunner?.java:154) at android.test.InstrumentationTestRunner?.onStart(InstrumentationTestRunner?.ja va: 520) at android.app.Instrumentation $InstrumentationThread?.run(Instrumentation.java:1447) I don't fix an error. Please help me! Thanks and Regards, Duy

Comment by qats...@gmail.com, Sep 21, 2011

Is it possible to test webview inside a native application using webDriver (Android and Native driver)

Comment by amarjyot...@gmail.com, Sep 27, 2011

Hi,

Is it possible to use nativeDriver on Windows using Android emulator/device.

Comment by dea...@gmail.com, Oct 2, 2011

Hi I have followed this document and i am trying to run the android-tests and i am getting the below error: org.openqa.selenium.WebDriverException?: java.net.SocketException?: Software caused connection abort: recv failed System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0' Driver info: driver.version: AndroidNativeDriver?

at org.openqa.selenium.remote.RemoteWebDriver?.execute(RemoteWebDriver?.java:406) at org.openqa.selenium.remote.RemoteWebDriver?.startSession(RemoteWebDriver?.java:103) at org.openqa.selenium.remote.RemoteWebDriver?.<init>(RemoteWebDriver?.java:86) at com.google.android.testing.nativedriver.client.AndroidNativeDriver?.<init>(Unknown Source) at com.google.android.testing.nativedriver.client.AndroidNativeDriverBuilder?.build(Unknown Source) at com.google.android.testing.nativedriver.FindByTextTest?.getDriver(FindByTextTest?.java:57) at com.google.android.testing.nativedriver.FindByTextTest?.setUp(FindByTextTest?.java:46) at junit.framework.TestCase?.runBare(TestCase?.java:128) at junit.framework.TestResult?$1.protect(TestResult?.java:106) at junit.framework.TestResult?.runProtected(TestResult?.java:124) at junit.framework.TestResult?.run(TestResult?.java:109) at junit.framework.TestCase?.run(TestCase?.java:120) at junit.framework.TestSuite?.runTest(TestSuite?.java:230) at junit.framework.TestSuite?.run(TestSuite?.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution?.run(TestExecution?.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner?.runTests(RemoteTestRunner?.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner?.runTests(RemoteTestRunner?.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner?.run(RemoteTestRunner?.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner?.main(RemoteTestRunner?.java:197)
Caused by: java.net.SocketException?: Software caused connection abort: recv failed
at java.net.SocketInputStream?.socketRead0(Native Method) at java.net.SocketInputStream?.read(SocketInputStream?.java:150) at java.net.SocketInputStream?.read(SocketInputStream?.java:121) at org.apache.http.impl.io.AbstractSessionInputBuffer?.fillBuffer(AbstractSessionInputBuffer?.java:130) at org.apache.http.impl.io.SocketInputBuffer?.fillBuffer(SocketInputBuffer?.java:127) at org.apache.http.impl.io.AbstractSessionInputBuffer?.readLine(AbstractSessionInputBuffer?.java:233) at org.apache.http.impl.conn.DefaultResponseParser?.parseHead(DefaultResponseParser?.java:98) at org.apache.http.impl.io.AbstractMessageParser?.parse(AbstractMessageParser?.java:210) at org.apache.http.impl.AbstractHttpClientConnection?.receiveResponseHeader(AbstractHttpClientConnection?.java:271) at org.apache.http.impl.conn.DefaultClientConnection?.receiveResponseHeader(DefaultClientConnection?.java:233) at org.apache.http.impl.conn.AbstractClientConnAdapter?.receiveResponseHeader(AbstractClientConnAdapter?.java:209) at org.apache.http.protocol.HttpRequestExecutor?.doReceiveResponse(HttpRequestExecutor?.java:292) at org.apache.http.protocol.HttpRequestExecutor?.execute(HttpRequestExecutor?.java:126) at org.apache.http.impl.client.DefaultRequestDirector?.execute(DefaultRequestDirector?.java:483) at org.apache.http.impl.client.AbstractHttpClient?.execute(AbstractHttpClient?.java:641) at org.openqa.selenium.remote.HttpCommandExecutor?.fallBackExecute(HttpCommandExecutor?.java:272) at org.openqa.selenium.remote.HttpCommandExecutor?.execute(HttpCommandExecutor?.java:252) at org.openqa.selenium.remote.RemoteWebDriver?.execute(RemoteWebDriver?.java:389) ... 19 more

Comment by Chi.Khe...@realwat.net, Oct 20, 2011

No 1 successful with this....:( and project are error....:(

Comment by peatears...@gmail.com, Oct 28, 2011

I receive this error after trying to run the tests:

Oct 28, 2011 10:06:45 AM org.apache.http.impl.client.DefaultRequestDirector? execute INFO: I/O exception (org.apache.http.NoHttpResponseException?) caught when processing request: The target server failed to respond Oct 28, 2011 10:06:45 AM org.apache.http.impl.client.DefaultRequestDirector? execute INFO: Retrying request

I've run the ServerInstrumentation? command and set up port forwarding, with the confirmation message showing up in LogCat? as expected. Has anyone run into this problem? I pretty much followed the directions to the letter, so either I completely missed something or the documentation maybe is out of date.

Also, it would probably be of help to a lot of people to split Step 6 into two steps. At first glance the step seems to be saying just to click "Finish," but then it sneaks in "oh, also install this other tests project" and it's incredibly easy to miss, since those two actions have nothing to do with each other.

Comment by mouras...@gmail.com, Oct 28, 2011

I'm getting a ClassNotFound? when trying to start the Instrumentation...

ClassNotFoundException?: com.google.android.testing.nativedriver.server.ServerInstrumentation?

Does anyone know how to fix this?

Comment by c.martin...@gmail.com, Nov 23, 2011

I've followed these instructions to the letter several times and I just can't get the JUnit tests to run. The emulator seems to be running fine with the app ready and waiting. When I do this:

  1. Right-click one of the three test classes in the android-test project
2. Select Run As->JUnit Test.
I don't get an opportunity to:
3. Specify the Eclipse JUnit Launcher as the Preferred Launcher.
The test immediately fails with a java.lang.NullPointerException?, before it ever gets into TestValueTest?.java.

What am I missing? Is there some assumed step or incantation for setting up JUnit that I'm not doing?

Any assistance would be greatly appreciated since I've been blocked for over a week on this issue.

Thanks, Martin

Comment by c.martin...@gmail.com, Nov 23, 2011

The specific error I get in Eclipse is:

An internal error occurred during: "Launching TextValueTest?". java.lang.NullPointerException?

Comment by pulsarin...@gmail.com, Nov 30, 2011

I'm also getting an error when trying to start the instrumentation. This is with the 'SampleLayout?' package. It also didn't work with a similar error on my own Android app.

Exception occurs and is logged in LogCat?: 11-30 13:27:25.600: E/AndroidRuntime?(31242): FATAL EXCEPTION: main 11-30 13:27:25.600: E/AndroidRuntime?(31242): java.lang.RuntimeException?: Unable to instantiate instrumentation ComponentInfo?{com.google.android.testing.nativedriver.simplelayouts/com.google.android.testing.nativedriver.server.ServerInstrumentation?}: java.lang.ClassNotFoundException?: com.google.android.testing.nativedriver.server.ServerInstrumentation? 11-30 13:27:25.600: E/AndroidRuntime?(31242): at android.app.ActivityThread?.handleBindApplication(ActivityThread?.java:3874) 11-30 13:27:25.600: E/AndroidRuntime?(31242): at android.app.ActivityThread?.access$1300(ActivityThread?.java:122) 11-30 13:27:25.600: E/AndroidRuntime?(31242): at android.app.ActivityThread?$H.handleMessage(ActivityThread?.java:1184) 11-30 13:27:25.600: E/AndroidRuntime?(31242): at android.os.Handler.dispatchMessage(Handler.java:99) 11-30 13:27:25.600: E/AndroidRuntime?(31242): at android.os.Looper.loop(Looper.java:137) 11-30 13:27:25.600: E/AndroidRuntime?(31242): at android.app.ActivityThread?.main(ActivityThread?.java:4340) 11-30 13:27:25.600: E/AndroidRuntime?(31242): at java.lang.reflect.Method.invokeNative(Native Method) 11-30 13:27:25.600: E/AndroidRuntime?(31242): at java.lang.reflect.Method.invoke(Method.java:511) 11-30 13:27:25.600: E/AndroidRuntime?(31242): at com.android.internal.os.ZygoteInit?$MethodAndArgsCaller?.run(ZygoteInit?.java:784) 11-30 13:27:25.600: E/AndroidRuntime?(31242): at com.android.internal.os.ZygoteInit?.main(ZygoteInit?.java:551) 11-30 13:27:25.600: E/AndroidRuntime?(31242): at dalvik.system.NativeStart?.main(Native Method) 11-30 13:27:25.600: E/AndroidRuntime?(31242): Caused by: java.lang.ClassNotFoundException?: com.google.android.testing.nativedriver.server.ServerInstrumentation? 11-30 13:27:25.600: E/AndroidRuntime?(31242): at dalvik.system.BaseDexClassLoader?.findClass(BaseDexClassLoader?.java:61) 11-30 13:27:25.600: E/AndroidRuntime?(31242): at java.lang.ClassLoader?.loadClass(ClassLoader?.java:501) 11-30 13:27:25.600: E/AndroidRuntime?(31242): at java.lang.ClassLoader?.loadClass(ClassLoader?.java:461) 11-30 13:27:25.600: E/AndroidRuntime?(31242): at android.app.ActivityThread?.handleBindApplication(ActivityThread?.java:3871) 11-30 13:27:25.600: E/AndroidRuntime?(31242): ... 10 more

Comment by iamthila...@gmail.com, Feb 6, 2012

Hi All,

could you please explain more about the setup of native driver and how to download the source code for native driver. please help me on this.

Thanks, Raj.

Comment by ravi.antone, Feb 16, 2012

Hi,

After running the Instrumentation step, It gives nothing. and I could see some exceptions in the logcat

/ActivityManager?( 880): Force stopping package com.google.android.testing.nati edriver.simplelayouts uid=10041 /dalvikvm( 3496): Not late-enabling CheckJNI (already on) /ActivityManager?( 880): Start proc com.google.android.testing.nativedriver.sim lelayouts for added application com.google.android.testing.nativedriver.simplel youts: pid=3496 uid=10041 gids={3003, 1015} /AndroidRuntime?( 3486): Shutting down VM /AndroidRuntime?( 3486): NOTE: attach of thread 'Binder Thread #3' failed /dalvikvm( 3486): GC_CONCURRENT freed 100K, 78% free 457K/2048K, paused 2ms+3ms

/jdwp ( 3486): Got wake-up signal, bailing out of select /dalvikvm( 3486): Debugger has detached; object registry had 1 entries /AndroidRuntime?( 3496): Shutting down VM /dalvikvm( 3496): threadid=1: thread exiting with uncaught exception (group=0x4 9961f8) /AndroidRuntime?( 3496): FATAL EXCEPTION: main /AndroidRuntime?( 3496): java.lang.RuntimeException?: Unable to instantiate instr mentation ComponentInfo?{com.google.android.testing.nativedriver.simplelayouts/c m.google.android.testing.nativedriver.server.ServerInstrumentation?}: java.lang. lassNotFoundException: com.google.android.testing.nativedriver.server.ServerIns? rumentation /AndroidRuntime?( 3496): at android.app.ActivityThread?.handleBindApplicat on(ActivityThread?.java:3874) /AndroidRuntime?( 3496): at android.app.ActivityThread?.access$1300(Activi yThread.java:122) /AndroidRuntime?( 3496): at android.app.ActivityThread?$H.handleMessage(Ac ivityThread.java:1184) /AndroidRuntime?( 3496): at android.os.Handler.dispatchMessage(Handler.ja a:99) /AndroidRuntime?( 3496): at android.os.Looper.loop(Looper.java:137) /AndroidRuntime?( 3496): at android.app.ActivityThread?.main(ActivityThrea? .java:4340) /AndroidRuntime?( 3496): at java.lang.reflect.Method.invokeNative(Native ethod) /AndroidRuntime?( 3496): at java.lang.reflect.Method.invoke(Method.java:5 1) /AndroidRuntime?( 3496): at com.android.internal.os.ZygoteInit?$MethodAndA gsCaller.run(ZygoteInit?.java:784) /AndroidRuntime?( 3496): at com.android.internal.os.ZygoteInit?.main(Zygot Init.java:551) /AndroidRuntime?( 3496): at dalvik.system.NativeStart?.main(Native Method)

/AndroidRuntime?( 3496): Caused by: java.lang.ClassNotFoundException?: com.google android.testing.nativedriver.server.ServerInstrumentation? /AndroidRuntime?( 3496): at dalvik.system.BaseDexClassLoader?.findClass(Ba eDexClassLoader.java:61) /AndroidRuntime?( 3496): at java.lang.ClassLoader?.loadClass(ClassLoader?.j va:501) /AndroidRuntime?( 3496): at java.lang.ClassLoader?.loadClass(ClassLoader?.j va:461) /AndroidRuntime?( 3496): at android.app.ActivityThread?.handleBindApplicat on(ActivityThread?.java:3871) /AndroidRuntime?( 3496): ... 10 more /ActivityManager?( 880): Error in app com.google.android.testing.nativedriver.s mplelayouts running instrumentation ComponentInfo?{com.google.android.testing.na ivedriver.simplelayouts/com.google.android.testing.nativedriver.server.ServerIn? trumentation}: /ActivityManager?( 880): java.lang.ClassNotFoundException? /ActivityManager?( 880): java.lang.ClassNotFoundException?: com.google.android testing.nativedriver.server.ServerInstrumentation? /ActivityManager?( 880): Force stopping package com.google.android.testing.nati edriver.simplelayouts uid=10041 /Process ( 880): Sending signal. PID: 3496 SIG: 9 /WindowManager?( 880): Failure taking screenshot for (180x300) to layer 21010 /NetworkManagementSocketTagger?( 880): setKernelCountSet(10004, 1) failed with rrno -2 /WindowManager?( 880): createSurface Window{415fb198 com.android.launcher/com.a droid.launcher2.Launcher paused=false}: DRAW NOW PENDING /InputManagerService?( 880): Starting input on non-focused client com.android.i ternal.view.IInputMethodClient$Stub$Proxy@415c5ed0 (uid=10015 pid=1087) /NetworkManagementSocketTagger?( 880): setKernelCountSet(10015, 0) failed with rrno -2

any pointers ?

Comment by jgibson....@gmail.com, Feb 21, 2012

I have an android project, a test one with a number of buttons which load a webview. I have downloaded and built the Native Driver, and have the two jars. After this i'm confused.

I dont want to use the SimpleLayouts? example as i fear this will confuse things futher.

Can anyone give me a step by step for creating a test project to test the 'testable' project i have created? (the 'testable' project runs ok in the emulator)

Comment by alcianic...@gmail.com, Mar 5, 2012

I am unable to run my scripts. Getting the following error

org.openqa.selenium.WebDriverException?: com.google.android.testing.nativedriver.server.ElementFinder?$SearchContextImpl? cannot be cast to org.openqa.selenium.internal.FindsByXPath

Comment by HeartPan...@gmail.com, Mar 21, 2012
following this document and i am trying to run the android-tests , i am getting the below error

org.openqa.selenium.WebDriverException?: java.net.SocketException?: Software caused connection abort: recv failed System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_03' Driver info: driver.version: AndroidNativeDriver?

at org.openqa.selenium.remote.RemoteWebDriver?.execute(RemoteWebDriver?.java:406) at org.openqa.selenium.remote.RemoteWebDriver?.startSession(RemoteWebDriver?.java:103) at org.openqa.selenium.remote.RemoteWebDriver?.<init>(RemoteWebDriver?.java:86) at com.google.android.testing.nativedriver.client.AndroidNativeDriver?.<init>(Unknown Source) at com.google.android.testing.nativedriver.client.AndroidNativeDriverBuilder?.build(Unknown Source) at com.google.android.testing.nativedriver.TextValueTest?.getDriver(TextValueTest?.java:49) at com.google.android.testing.nativedriver.TextValueTest?.setUp(TextValueTest?.java:38) at junit.framework.TestCase?.runBare(TestCase?.java:128) at junit.framework.TestResult?$1.protect(TestResult?.java:106) at junit.framework.TestResult?.runProtected(TestResult?.java:124) at junit.framework.TestResult?.run(TestResult?.java:109) at junit.framework.TestCase?.run(TestCase?.java:120) at junit.framework.TestSuite?.runTest(TestSuite?.java:230) at junit.framework.TestSuite?.run(TestSuite?.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution?.run(TestExecution?.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner?.runTests(RemoteTestRunner?.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner?.runTests(RemoteTestRunner?.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner?.run(RemoteTestRunner?.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner?.main(RemoteTestRunner?.java:197)
Caused by: java.net.SocketException?: Software caused connection abort: recv failed
at java.net.SocketInputStream?.socketRead0(Native Method) at java.net.SocketInputStream?.read(Unknown Source) at java.net.SocketInputStream?.read(Unknown Source) at org.apache.http.impl.io.AbstractSessionInputBuffer?.fillBuffer(AbstractSessionInputBuffer?.java:130) at org.apache.http.impl.io.SocketInputBuffer?.fillBuffer(SocketInputBuffer?.java:127) at org.apache.http.impl.io.AbstractSessionInputBuffer?.readLine(AbstractSessionInputBuffer?.java:233) at org.apache.http.impl.conn.DefaultResponseParser?.parseHead(DefaultResponseParser?.java:98) at org.apache.http.impl.io.AbstractMessageParser?.parse(AbstractMessageParser?.java:210) at org.apache.http.impl.AbstractHttpClientConnection?.receiveResponseHeader(AbstractHttpClientConnection?.java:271) at org.apache.http.impl.conn.DefaultClientConnection?.receiveResponseHeader(DefaultClientConnection?.java:233) at org.apache.http.impl.conn.AbstractClientConnAdapter?.receiveResponseHeader(AbstractClientConnAdapter?.java:209) at org.apache.http.protocol.HttpRequestExecutor?.doReceiveResponse(HttpRequestExecutor?.java:292) at org.apache.http.protocol.HttpRequestExecutor?.execute(HttpRequestExecutor?.java:126) at org.apache.http.impl.client.DefaultRequestDirector?.execute(DefaultRequestDirector?.java:483) at org.apache.http.impl.client.AbstractHttpClient?.execute(AbstractHttpClient?.java:641) at org.openqa.selenium.remote.HttpCommandExecutor?.fallBackExecute(HttpCommandExecutor?.java:272) at org.openqa.selenium.remote.HttpCommandExecutor?.execute(HttpCommandExecutor?.java:252) at org.openqa.selenium.remote.RemoteWebDriver?.execute(RemoteWebDriver?.java:389) ... 19 more

the output of "adb logcat" is as follows: tivedriver.simplelayouts/com.google.android.testing.nativedriver.server.ServerIn? strumentation}: W/ActivityManager?( 59): java.lang.ClassNotFoundException? W/ActivityManager?( 59): java.lang.ClassNotFoundException?: com.google.android .testing.nativedriver.server.ServerInstrumentation? in loader dalvik.system.PathC lassLoader[/data/app/com.google.android.testing.nativedriver.simplelayouts-1.apk :/data/app/com.google.android.testing.nativedriver.simplelayouts-1.apk] I/ActivityManager?( 59): Force stopping package com.google.android.testing.nati vedriver.simplelayouts uid=10036 I/Process ( 59): Sending signal. PID: 291 SIG: 9 D/AndroidRuntime?( 300): D/AndroidRuntime?( 300): >>>>>>>>>>>>>> AndroidRuntime? START <<<<<<<<<<<<<< D/AndroidRuntime?( 300): CheckJNI is ON D/AndroidRuntime?( 300): --- registering native functions --- I/ActivityManager?( 59): Force stopping package com.google.android.testing.nati vedriver.simplelayouts uid=10036 I/ActivityManager?( 59): Start proc com.google.android.testing.nativedriver.sim plelayouts for added application com.google.android.testing.nativedriver.simplel ayouts: pid=306 uid=10036 gids={3003, 1015} D/AndroidRuntime?( 300): Shutting down VM D/jdwp ( 300): adbd disconnected I/AndroidRuntime?( 300): NOTE: attach of thread 'Binder Thread #3' failed D/AndroidRuntime?( 306): Shutting down VM W/dalvikvm( 306): threadid=1: thread exiting with uncaught exception (group=0x4 001d800) E/AndroidRuntime?( 306): FATAL EXCEPTION: main E/AndroidRuntime?( 306): java.lang.RuntimeException?: Unable to instantiate instr umentation ComponentInfo?{com.google.android.testing.nativedriver.simplelayouts/c om.google.android.testing.nativedriver.server.ServerInstrumentation?}: java.lang. ClassNotFoundException?: com.google.android.testing.nativedriver.server.ServerIns? trumentation in loader dalvik.system.PathClassLoader?[/data/app/com.google.androi d.testing.nativedriver.simplelayouts-1.apk:/data/app/com.google.android.testing. nativedriver.simplelayouts-1.apk] E/AndroidRuntime?( 306): at android.app.ActivityThread?.handleBindApplicat ion(ActivityThread?.java:4202) E/AndroidRuntime?( 306): at android.app.ActivityThread?.access$3000(Activi tyThread.java:125) E/AndroidRuntime?( 306): at android.app.ActivityThread?$H.handleMessage(Ac tivityThread.java:2071) E/AndroidRuntime?( 306): at android.os.Handler.dispatchMessage(Handler.ja va:99) E/AndroidRuntime?( 306): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime?( 306): at android.app.ActivityThread?.main(ActivityThrea? d.java:4627) E/AndroidRuntime?( 306): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime?( 306): at java.lang.reflect.Method.invoke(Method.java:5 21) E/AndroidRuntime?( 306): at com.android.internal.os.ZygoteInit?$MethodAndA rgsCaller.run(ZygoteInit?.java:868) E/AndroidRuntime?( 306): at com.android.internal.os.ZygoteInit?.main(Zygot eInit.java:626) E/AndroidRuntime?( 306): at dalvik.system.NativeStart?.main(Native Method)

E/AndroidRuntime?( 306): Caused by: java.lang.ClassNotFoundException?: com.google .android.testing.nativedriver.server.ServerInstrumentation? in loader dalvik.syst em.PathClassLoader?[/data/app/com.google.android.testing.nativedriver.simplelayou ts-1.apk:/data/app/com.google.android.testing.nativedriver.simplelayouts-1.apk] E/AndroidRuntime?( 306): at dalvik.system.PathClassLoader?.findClass(PathC lassLoader.java:243) E/AndroidRuntime?( 306): at java.lang.ClassLoader?.loadClass(ClassLoader?.j ava:573) E/AndroidRuntime?( 306): at java.lang.ClassLoader?.loadClass(ClassLoader?.j ava:532) E/AndroidRuntime?( 306): at android.app.ActivityThread?.handleBindApplicat ion(ActivityThread?.java:4199) E/AndroidRuntime?( 306): ... 10 more W/ActivityManager?( 59): Error in app com.google.android.testing.nativedriver.s implelayouts running instrumentation ComponentInfo?{com.google.android.testing.na tivedriver.simplelayouts/com.google.android.testing.nativedriver.server.ServerIn? strumentation}: W/ActivityManager?( 59): java.lang.ClassNotFoundException? W/ActivityManager?( 59): java.lang.ClassNotFoundException?: com.google.android .testing.nativedriver.server.ServerInstrumentation? in loader dalvik.system.PathC lassLoader[/data/app/com.google.android.testing.nativedriver.simplelayouts-1.apk :/data/app/com.google.android.testing.nativedriver.simplelayouts-1.apk] I/ActivityManager?( 59): Force stopping package com.google.android.testing.nati vedriver.simplelayouts uid=10036 I/Process ( 59): Sending signal. PID: 306 SIG: 9 D/SntpClient?( 59): request time failed: java.net.SocketException?: Address fami ly not supported by protocol D/dalvikvm( 125): GC_EXTERNAL_ALLOC freed 1043 objects / 62856 bytes in 82ms I/ActivityManager?( 59): Starting activity: Intent { act=android.intent.action. MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.google.androi d.testing.nativedriver.simplelayouts/.ListViewActivity? } I/ActivityManager?( 59): Start proc com.google.android.testing.nativedriver.sim plelayouts for activity com.google.android.testing.nativedriver.simplelayouts/.L istViewActivity: pid=315 uid=10036 gids={3003, 1015} W/KeyCharacterMap?( 125): No keyboard for id 0 W/KeyCharacterMap?( 125): Using default keymap: /system/usr/keychars/qwerty.kcm. bin D/SntpClient?( 59): request time failed: java.net.SocketException?: Address fami ly not supported by protocol I/ActivityManager?( 59): Displayed activity com.google.android.testing.nativedr iver.simplelayouts/.ListViewActivity?: 1579 ms (total 1579 ms) W/InputManagerService?( 59): Starting input on non-focused client com.android.i nternal.view.IInputMethodClient$Stub$Proxy@44fe34f0 (uid=10036 pid=315) W/IInputConnectionWrapper( 315): showStatusIcon on inactive InputConnection? I/ActivityManager?( 59): Starting activity: Intent { act=android.intent.action. MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.google.androi d.testing.nativedriver.simplelayouts/.TextValueActivity? } I/ActivityManager?( 59): Displayed activity com.google.android.testing.nativedr iver.simplelayouts/.TextValueActivity?: 798 ms (total 798 ms) D/dalvikvm( 125): GC_EXPLICIT freed 519 objects / 24920 bytes in 182ms D/dalvikvm( 59): Debugger has detached; object registry had 1 entries D/dalvikvm( 125): Debugger has detached; object registry had 1 entries D/dalvikvm( 129): Debugger has detached; object registry had 1 entries D/dalvikvm( 161): Debugger has detached; object registry had 1 entries D/dalvikvm( 167): Debugger has detached; object registry had 1 entries D/dalvikvm( 59): Debugger has detached; object registry had 1 entries D/dalvikvm( 121): Debugger has detached; object registry had 1 entries D/dalvikvm( 117): Debugger has detached; object registry had 1 entries D/dalvikvm( 180): Debugger has detached; object registry had 1 entries D/dalvikvm( 192): Debugger has detached; object registry had 1 entries D/dalvikvm( 201): Debugger has detached; object registry had 1 entries D/dalvikvm( 206): Debugger has detached; object registry had 1 entries D/dalvikvm( 215): Debugger has detached; object registry had 1 entries D/dalvikvm( 228): Debugger has detached; object registry had 1 entries D/dalvikvm( 315): Debugger has detached; object registry had 1 entries D/dalvikvm( 261): Debugger has detached; object registry had 1 entries D/dalvikvm( 243): Debugger has detached; object registry had 1 entries D/AndroidRuntime?( 337): D/AndroidRuntime?( 337): >>>>>>>>>>>>>> AndroidRuntime? START <<<<<<<<<<<<<< D/AndroidRuntime?( 337): CheckJNI is ON D/AndroidRuntime?( 337): --- registering native functions --- D/dalvikvm( 201): GC_EXPLICIT freed 529 objects / 30424 bytes in 167ms D/PackageParser?( 59): Scanning package: /data/app/vmdl33157.tmp I/PackageParser?( 59): com.google.android.testing.nativedriver.simplelayouts: c ompat added android.permission.WRITE_EXTERNAL_STORAGE android.permission.READ_PH ONE_STATE D/dalvikvm( 59): GC_FOR_MALLOC freed 19311 objects / 1135808 bytes in 137ms I/PackageManager?( 59): Removing non-system package:com.google.android.testing. nativedriver.simplelayouts I/ActivityManager?( 59): Force stopping package com.google.android.testing.nati vedriver.simplelayouts uid=10036 I/Process ( 59): Sending signal. PID: 315 SIG: 9 I/UsageStats?( 59): Unexpected resume of com.android.launcher while already res umed in com.google.android.testing.nativedriver.simplelayouts I/WindowManager?( 59): WIN DEATH: Window{4510e598 com.google.android.testing.na tivedriver.simplelayouts/com.google.android.testing.nativedriver.simplelayouts.T extValueActivity paused=false} W/InputManagerService?( 59): Got RemoteException? sending setActive(false) notif ication to pid 315 uid 10036 D/PackageManager?( 59): Scanning package com.google.android.testing.nativedrive r.simplelayouts I/PackageManager?( 59): Package com.google.android.testing.nativedriver.simplel ayouts codePath changed from /data/app/com.google.android.testing.nativedriver.s implelayouts-1.apk to /data/app/com.google.android.testing.nativedriver.simplela youts-2.apk; Retaining data and using new I/PackageManager?( 59): /data/app/com.google.android.testing.nativedriver.simpl elayouts-2.apk changed; unpacking D/installd( 35): DexInv?: --- BEGIN '/data/app/com.google.android.testing.nativ edriver.simplelayouts-2.apk' --- D/dalvikvm( 344): DexOpt?: load 339ms, verify 3260ms, opt 137ms D/installd( 35): DexInv?: --- END '/data/app/com.google.android.testing.natived river.simplelayouts-2.apk' (success) --- W/PackageManager?( 59): Code path for pkg : com.google.android.testing.nativedr iver.simplelayouts changing from /data/app/com.google.android.testing.nativedriv er.simplelayouts-1.apk to /data/app/com.google.android.testing.nativedriver.simp lelayouts-2.apk W/PackageManager?( 59): Resource path for pkg : com.google.android.testing.nati vedriver.simplelayouts changing from /data/app/com.google.android.testing.native driver.simplelayouts-1.apk to /data/app/com.google.android.testing.nativedriver. simplelayouts-2.apk D/PackageManager?( 59): Activities: com.google.android.testing.nativedriver.s implelayouts.TextValueActivity? com.google.android.testing.nativedriver.simplelay outs.SpinnersActivity? com.google.android.testing.nativedriver.simplelayouts.List ViewActivity? D/PackageManager?( 59): Instrumentation: com.google.android.testing.nativedri ver.server.ServerInstrumentation? I/ActivityManager?( 59): Force stopping package com.google.android.testing.nati vedriver.simplelayouts uid=10036 I/installd( 35): move /data/dalvik-cache/data@app@com.google.android.testing.n ativedriver.simplelayouts-2.apk@classes.dex -> /data/dalvik-cache/data@app@com.g oogle.android.testing.nativedriver.simplelayouts-2.apk@classes.dex D/PackageManager?( 59): New package installed in /data/app/com.google.android.t esting.nativedriver.simplelayouts-2.apk D/dalvikvm( 59): GC_FOR_MALLOC freed 14912 objects / 796472 bytes in 153ms I/ActivityManager?( 59): Force stopping package com.google.android.testing.nati vedriver.simplelayouts uid=10036 D/dalvikvm( 125): GC_EXPLICIT freed 978 objects / 46760 bytes in 78ms D/dalvikvm( 59): GC_EXPLICIT freed 10233 objects / 539200 bytes in 235ms W/RecognitionManagerService?( 59): no available voice recognition services foun d I/installd( 35): unlink /data/dalvik-cache/data@app@com.google.android.testing .nativedriver.simplelayouts-1.apk@classes.dex D/AndroidRuntime?( 337): Shutting down VM D/dalvikvm( 337): Debugger has detached; object registry had 1 entries I/AndroidRuntime?( 337): NOTE: attach of thread 'Binder Thread #3' failed D/AndroidRuntime?( 350): D/AndroidRuntime?( 350): >>>>>>>>>>>>>> AndroidRuntime? START <<<<<<<<<<<<<< D/AndroidRuntime?( 350): CheckJNI is ON D/AndroidRuntime?( 350): --- registering native functions --- I/ActivityManager?( 59): Starting activity: Intent { act=android.intent.action. MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.google.androi d.testing.nativedriver.simplelayouts/.TextValueActivity? } D/AndroidRuntime?( 350): Shutting down VM D/dalvikvm( 350): Debugger has detached; object registry had 1 entries I/AndroidRuntime?( 350): NOTE: attach of thread 'Binder Thread #3' failed I/ActivityManager?( 59): Start proc com.google.android.testing.nativedriver.sim plelayouts for activity com.google.android.testing.nativedriver.simplelayouts/.T extValueActivity: pid=357 uid=10036 gids={3003, 1015} D/dalvikvm( 33): GC_EXPLICIT freed 297 objects / 11376 bytes in 713ms D/dalvikvm( 33): GC_EXPLICIT freed 47 objects / 2088 bytes in 615ms D/dalvikvm( 33): GC_EXPLICIT freed 2 objects / 64 bytes in 277ms I/ActivityManager?( 59): Displayed activity com.google.android.testing.nativedr iver.simplelayouts/.TextValueActivity?: 2690 ms (total 2690 ms) D/SntpClient?( 59): request time failed: java.net.SocketException?: Address fami ly not supported by protocol D/dalvikvm( 201): GC_EXPLICIT freed 216 objects / 15328 bytes in 160ms D/dalvikvm( 261): GC_EXPLICIT freed 802 objects / 56920 bytes in 172ms D/dalvikvm( 125): GC_EXPLICIT freed 876 objects / 51824 bytes in 123ms D/AndroidRuntime?( 368): D/AndroidRuntime?( 368): >>>>>>>>>>>>>> AndroidRuntime? START <<<<<<<<<<<<<< D/AndroidRuntime?( 368): CheckJNI is ON D/AndroidRuntime?( 368): --- registering native functions --- I/ActivityManager?( 59): Force stopping package com.google.android.testing.nati vedriver.simplelayouts uid=10036 I/Process ( 59): Sending signal. PID: 357 SIG: 9 I/WindowManager?( 59): WIN DEATH: Window{44fedb20 com.google.android.testing.na tivedriver.simplelayouts/com.google.android.testing.nativedriver.simplelayouts.T extValueActivity paused=false} I/UsageStats?( 59): Unexpected resume of com.android.launcher while already res umed in com.google.android.testing.nativedriver.simplelayouts I/ActivityManager?( 59): Start proc com.google.android.testing.nativedriver.sim plelayouts for added application com.google.android.testing.nativedriver.simplel ayouts: pid=374 uid=10036 gids={3003, 1015} D/AndroidRuntime?( 368): Shutting down VM D/dalvikvm( 368): Debugger has detached; object registry had 1 entries I/AndroidRuntime?( 368): NOTE: attach of thread 'Binder Thread #3' failed W/InputManagerService?( 59): Got RemoteException? sending setActive(false) notif ication to pid 357 uid 10036 D/AndroidRuntime?( 374): Shutting down VM W/dalvikvm( 374): threadid=1: thread exiting with uncaught exception (group=0x4 001d800) E/AndroidRuntime?( 374): FATAL EXCEPTION: main E/AndroidRuntime?( 374): java.lang.RuntimeException?: Unable to instantiate instr umentation ComponentInfo?{com.google.android.testing.nativedriver.simplelayouts/c om.google.android.testing.nativedriver.server.ServerInstrumentation?}: java.lang. ClassNotFoundException?: com.google.android.testing.nativedriver.server.ServerIns? trumentation in loader dalvik.system.PathClassLoader?[/data/app/com.google.androi d.testing.nativedriver.simplelayouts-2.apk:/data/app/com.google.android.testing. nativedriver.simplelayouts-2.apk] E/AndroidRuntime?( 374): at android.app.ActivityThread?.handleBindApplicat ion(ActivityThread?.java:4202) E/AndroidRuntime?( 374): at android.app.ActivityThread?.access$3000(Activi tyThread.java:125) E/AndroidRuntime?( 374): at android.app.ActivityThread?$H.handleMessage(Ac tivityThread.java:2071) E/AndroidRuntime?( 374): at android.os.Handler.dispatchMessage(Handler.ja va:99) E/AndroidRuntime?( 374): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime?( 374): at android.app.ActivityThread?.main(ActivityThrea? d.java:4627) E/AndroidRuntime?( 374): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime?( 374): at java.lang.reflect.Method.invoke(Method.java:5 21) E/AndroidRuntime?( 374): at com.android.internal.os.ZygoteInit?$MethodAndA rgsCaller.run(ZygoteInit?.java:868) E/AndroidRuntime?( 374): at com.android.internal.os.ZygoteInit?.main(Zygot eInit.java:626) E/AndroidRuntime?( 374): at dalvik.system.NativeStart?.main(Native Method)

E/AndroidRuntime?( 374): Caused by: java.lang.ClassNotFoundException?: com.google .android.testing.nativedriver.server.ServerInstrumentation? in loader dalvik.syst em.PathClassLoader?[/data/app/com.google.android.testing.nativedriver.simplelayou ts-2.apk:/data/app/com.google.android.testing.nativedriver.simplelayouts-2.apk] E/AndroidRuntime?( 374): at dalvik.system.PathClassLoader?.findClass(PathC lassLoader.java:243) E/AndroidRuntime?( 374): at java.lang.ClassLoader?.loadClass(ClassLoader?.j ava:573) E/AndroidRuntime?( 374): at java.lang.ClassLoader?.loadClass(ClassLoader?.j ava:532) E/AndroidRuntime?( 374): at android.app.ActivityThread?.handleBindApplicat ion(ActivityThread?.java:4199) E/AndroidRuntime?( 374): ... 10 more W/ActivityManager?( 59): Error in app com.google.android.testing.nativedriver.s implelayouts running instrumentation ComponentInfo?{com.google.android.testing.na tivedriver.simplelayouts/com.google.android.testing.nativedriver.server.ServerIn? strumentation}: W/ActivityManager?( 59): java.lang.ClassNotFoundException? W/ActivityManager?( 59): java.lang.ClassNotFoundException?: com.google.android .testing.nativedriver.server.ServerInstrumentation? in loader dalvik.system.PathC lassLoader[/data/app/com.google.android.testing.nativedriver.simplelayouts-2.apk :/data/app/com.google.android.testing.nativedriver.simplelayouts-2.apk] I/ActivityManager?( 59): Force stopping package com.google.android.testing.nati vedriver.simplelayouts uid=10036 I/Process ( 59): Sending signal. PID: 374 SIG: 9 D/SntpClient?( 59): request time failed: java.net.SocketException?: Address fami ly not supported by protocol D/SntpClient?( 59): request time failed: java.net.SocketException?: Address fami ly not supported by protocol D/SntpClient?( 59): request time failed: java.net.SocketException?: Address fami ly not supported by protocol D/SntpClient?( 59): request time failed: java.net.SocketException?: Address fami ly not supported by protocol D/SntpClient?( 59): request time failed: java.net.SocketException?: Address fami ly not supported by protocol


Sign in to add a comment
Powered by Google Project Hosting