Start a new topic

Trouble getting started on Android

I am following the getting started guide for Android: http://devcenter.kinvey.com/android/guides/getting-started#AddanAppBackend.



public class MainActivity extends Activity

final Client mKinveyClient = new Client.Builder("my_key",

"my_secret", this.getApplicationContext()).build();



@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_main);

}



Simply calling new Client.Builder() gives me the following run-time error:

[2014-01-10 14:34:38 - ddmlib] An established connection was aborted by the software in your host machine

java.io.IOException: An established connection was aborted by the software in your host machine

at sun.nio.ch.SocketDispatcher.write0(Native Method)

at sun.nio.ch.SocketDispatcher.write(Unknown Source)

at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)

at sun.nio.ch.IOUtil.write(Unknown Source)

at sun.nio.ch.SocketChannelImpl.write(Unknown Source)

at com.android.ddmlib.JdwpPacket.writeAndConsume(JdwpPacket.java:213)

at com.android.ddmlib.Client.sendAndConsume(Client.java:642)

at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:348)

at com.android.ddmlib.Client.requestAllocationStatus(Client.java:488)

at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:835)

at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:803)

at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(DeviceMonitor.java:763)

at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:652)

at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:44)

at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:580)



There was no problem with the internet connection and I have the perimission for







The device I tested on Nexus 4 with Android version 4.4.
1 Comment

Hey,



this seems to be an issue with the the build environment, and isn't an error thrown through the library.



Check out: http://stackoverflow.com/questions/5618664/an-established-connection-was-aborted-by-the-software-in-your-host-machine



that might point you in the right direction.



Also, try stopping and restarting adb, in a terminal type:



adb kill-server

adb start-server
Login or Signup to post a comment