Android USB Library - java

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.

Related

Unable to track the Crash in android studio

I am developing an android app. I got one weird issue while testing my app.
My app is crashing randomly at any moment showing this dialog:
"Unfortunately XYX app has stopped"
When I tracked the logs I got this one:
Fatal signal 11 (SIGSEGV), code 1, fault addr 0xdbc in tid 11744 (FinalizerDaemon)
Native Libraries Used:
compile 'com.android.support:support-v4:23.2.0'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
compile 'com.android.support:cardview-v7:23.2.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.google.android.gms:play-services-location:8.3.0'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar')
I am unable to fix this bug. I searched a lot but couldn't find anything useful.
I developing in API version 8-22.

Libgdx requires OpenGL ES 2.0

I'm trying to test my Android game in a emulator Nexus_5_API_23. It generates an error right away. 'Unfortunately My_App has stopped...'
I'm not sure where the problem is because it's fine when I choose to run the app as a desktop application. THis only occures when I try to run as Android
Here's the logcat:
03-05 09:55:34.215 1209-1209/com.packtpub.libgdx.outtacluck.android E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.packtpub.libgdx.outtacluck.android, PID: 1209
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.packtpub.libgdx.outtacluck.android/com.packtpub.libgdx.outtacluck.android.AndroidLauncher}: com.badlogic.gdx.utils.GdxRuntimeException: Libgdx requires OpenGL ES 2.0
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)

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'

Eclipse Java - Android app using serial do not work

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.

library "libmaliinstr.so" not found.... in eclipse

please help me. my Android application is an Alarm application that play on time in many Android devices, but my code has been error when played in some devices like Huawei Honor C3. the error is:
09-26 18:17:19.119: E/linker(23841): load_library(linker.cpp:759): library "libmaliinstr.so" not found
09-26 18:17:19.121: E/(23841): appName=com.behroid.intelligentalarm, acAppName=com.android.cts.openglperf
09-26 18:17:19.121: E/(23841): 0
09-26 18:17:19.121: E/(23841): appName=com.behroid.intelligentalarm, acAppName=com.android.browser
please give me some solution...
I guess some of the devices have missing library files. The same happened to me with opencl.so.
In that particular case I found the opencl.so file on the device and had to do a symlink opencl.so.1 to that particular apps appdata.(In the appdata folder in the root directory).

Categories