Connect Android App to AWS dynamoDB - java

i am trying to connect my android app to AWS dynamoDB. I followed
http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/dynamodb_om.html
But when I try to run it I get:
09-15 16:12:12.290 24313-24313/com.example.jan.tracestest E/AndroidRuntime﹕ FATAL EXCEPTION: main
com.amazonaws.AmazonClientException: Unable to execute HTTP request: null
Caused by: java.io.IOException
at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:87)
at libcore.net.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:205)
at libcore.net.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:281)
For the last two days i went over it again and again but I don't get it. Does anyone have some hints?
thx
this is the exception object giving me no hints...

thx to Raymond Lin
I did try to run it on the main thread. Now i do it with a Asynctask and it works.

Related

Wanted to automated mobile application

I'm trying to run a program, but it's showing an error:
Exception in thread "main"
org.openqa.selenium.SessionNotCreatedException: Unable to create a new
remote session. Please check the server log for more details.
Original error: An unknown server-side error occurred while processing the
command. Original error: The application at
'C:\Users\Sodainmind\eclipse-workspace.metadata.metadata\Mobileautomation\carbonate_staging_1-75_23MAR2020.apk'
does not exist or is not accessible
how to solve ? i have change work place of that application too but its not working

java.net.UnknownHostException while running RestAssured

I am Running Below Code & getting following exception
Exception in thread "main" java.net.UnknownHostException: maps.googleapis.com
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
I tried to check the same in CMD in order to check DNS issue . Can anyone suggest how we can resolve this "can't find maps.googleapis.com: Non-existent domain" issue.
I tried to check the DNS issue in using "nslookup maps.googleapis.com" CMD but I am getting the error "find https://maps.googleapis.com: Non-existent domain".
Code:
RestAssured.baseURI="https://maps.googleapis.com";
given().
param("location","-33.8670522,151.1957362").
param("radius","1500").
param("type","restaurant").
param("keyword","cruise").
param("key","AIzaSyA4HVDos-DFWuFJDmHNn8qlKBrRNSgAhtc").
when().
get("/maps/api/place/nearbysearch/json").
then().assertThat().
statusCode(250);
Expected- Should get response
Actual- Unable to run the code due to 'UnknownHostException'.

Android java.lang.NoSuchMethodError: No virtual method

I would like to send a post request to send data to my worksheet by Google Form
I use Android Studio, in my android project I have an error when I try to execute DefaultHttpClient object I get :
--------- beginning of crash
10-26 16:19:08.749 21824-22874/mypackage E/AndroidRuntime﹕ FATAL EXCEPTION: Thread-1553
Process: mypackage, PID: 21824
java.lang.NoSuchMethodError: No virtual method execute(Lorg/apache/http/client/methods/HttpUriRequest;Lorg/apache/http/protocol/HttpContext;)Lorg/apache/http/client/methods/CloseableHttpResponse; in class Lorg/apache/http/impl/client/DefaultHttpClient; or its super classes (declaration of 'org.apache.http.impl.client.DefaultHttpClient' appears in /system/framework/org.apache.http.legacy.boot.jar)
the error is reported to the line: response = httpClient.execute(httpPost,localContext);
I use httpclient-4.5.1.jar library
minSDK: API 15: Android 4.0.3 (IceCreamSandwich)
I don't know how to fix this! Please Help Me!
in build.gradle android section put this code
useLibrary 'org.apache.http.legacy'

Can't get xbee-api OpenCloseConnectionsTest.java to work

I'm currently using Netbeans on Windows 7, and I'm trying to run the the xbee-api's OpenCloseConnection test but keep getting connection still open errors.
I use XCTU to make sure I'm in API mode and I've updated the variable "device" to be the COM that the xbee is on...
What are some leads? Below is the exception:
Exception in thread "main" com.rapplogic.xbee.api.XBeeException at
com.rapplogic.xbee.api.XBee.open(XBee.java:146) at
VFART.Main.main(Main.java:82) Caused by: gnu.io.PortInUseException:
Unknown Application at
gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354) at
com.rapplogic.xbee.RxTxSerialComm.openSerialPort(RxTxSerialComm.java:97)
at
com.rapplogic.xbee.RxTxSerialComm.openSerialPort(RxTxSerialComm.java:61)
at com.rapplogic.xbee.api.XBee.open(XBee.java:140)

no package identifier when getting value for resource number 0x00000000

I am new to Android app development. I try to connect my app with facebook using SocialAuth SDK. but am getting a error as
"no package identifier when getting value for resource number 0x00000000" and thread id=1: thread exiting with uncaught exception (group=0xb2a40ba8) then it goes to FATAL EXCEPTION: main.
I have tried to clean and build the project, but nothing happens, still getting same errors.
Can anyone help me to resolve this problem.?
08-04 11:28:15.642: E/AndroidRuntime(2227):
android.content.res.Resources$NotFoundException: Resource ID
You have to put Icon for facebook named facebook.png into your res (Resource) folder it's not able to find it right now that's why you are getting ResourcesNotFoundException.

Categories