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'
Related
I'm using Roboguice 3.0.1 with RoboBlender 3.0.1. I've read the wiki. This application has been working perfectly since 3.0.1 has been GA (almost a year), and I just added proguard to my project. I've seemingly setup the proguard configuration correctly.
Anytime I run the application, I get this error immediately (this is all that is printed; no stack trace or anything).
11-24 01:36:05.473 12995-12995/com.me D/roboguice.RoboGuice: Using annotation database(s).
11-24 01:36:05.475 12995-12995/com.me D/roboguice.RoboGuice: Using annotation database(s) : [com.me, roboguice]
11-24 01:36:05.485 12995-12995/com.meD/roboguice.RoboGuice: Time spent loading annotation databases : 8
11-24 01:36:05.822 12995-12995/com.me E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.me, PID: <pid>
java.lang.RuntimeException: Unable to create application com.me.MeApplication: com.google.inject.CreationException: Unable to create injector, see the following errors:
Note: I've posted this as an issue in the RoboGuice repo, but since that place looks dead, I figured I'd be more likely to get help here.
Looks like it's an issue with Guice. There was an error at this line, but no error was printed.
Guice Issue
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.
I'm trying to use an app in Eclipse (v3.8), but it don't work.
The API is 19, and the app is Serial_Port_1.1.apk
My method: (I'm new with eclipse)
Extract the apk with apktool
Import the folder with Eclipse
Run as: Android application
I got theses errors:
threadid=1: thread exiting with uncaught exception (group=0xb3ac2ba8)
FATAL EXCEPTION: main
Process: android_serialport_api.sample, PID: 1508
java.lang.RuntimeException: Unable to instantiate application android_serialport_api.sample.Application: java.lang.ClassNotFoundException: Didn't find class "android_serialport_api.sample.Application" on path: DexPathList[[zip file "/data/app/android_serialport_api.sample-1.apk"],nativeLibraryDirectories=[/data/app-lib/android_serialport_api.sample-1, /vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:516)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4317)
I'm trying to connect an Arduino to Eclipse, and the app works fine on a real system (ARM Orange Pi)
As it says in the LogCat, there is a ClassNotFoundException when you try to run it after decompile. As I understood, the original app works but after decompile + recompile it won't work again, throwing a CNF. This means that your decompile process didn't work properly. I suggest you trying the Android APK Decompiler, which is a free online tool.
Note: I haven't tested it yet, but it should work.
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.
i`m trying to make an Arduino ADK + Android, and for this i have to use a USB library from android.
The library is com.android.future.usb, and i import com.android.future.usb.UsbAccessory, and com.android.future.usb.UsbManager.
I compile to my android 2.3.6 (Galaxy ACE), but the app stops because this error:
06-11 23:19:02.359: E/AndroidRuntime(1842): FATAL EXCEPTION: main
06-11 23:19:02.359: E/AndroidRuntime(1842):
java.lang.NoClassDefFoundError: com.android.future.usb.UsbManager
06-11 23:19:02.359: E/AndroidRuntime(1842): at
com.example.arduinoblinkled.MainActivity.onCreate(MainActivity.java:70)
Unfortunately the Galaxy ACE is a device that does not support AOA. Your getting the NoClassDefFoundError because it's simply not on your device.