I am working with gimbal proximity sdk. I am facing a strange error. The app is running perfectly fine on devices installed with pre-lollipop os versions. But when I try on lollipop devices I am getting an error at this line
contextContentConnector = ContextContentConnectorFactory.get(this);
Below is the LogCat message I am getting.
12-02 18:55:29.302: E/AndroidRuntime(20197): java.lang.AssertionError: impossible
12-02 18:55:29.302: E/AndroidRuntime(20197): at java.lang.Enum$1.create(Enum.java:45)
12-02 18:55:29.302: E/AndroidRuntime(20197): at java.lang.Enum$1.create(Enum.java:35)
12-02 18:55:29.302: E/AndroidRuntime(20197): at libcore.util.BasicLruCache.get(BasicLruCache.java:54)
12-02 18:55:29.302: E/AndroidRuntime(20197): at java.lang.Enum.getSharedConstants(Enum.java:211)
12-02 18:55:29.302: E/AndroidRuntime(20197): at java.lang.Enum.valueOf(Enum.java:191)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.qsl.faar.service.location.c.a.a(SourceFile:3)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.qsl.faar.service.location.e.a.e(SourceFile:93)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.qsl.faar.service.location.e.a.a(SourceFile:45)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.qsl.faar.service.location.d.<init>(SourceFile:65)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.qsl.faar.service.location.g.<init>(SourceFile:225)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.qsl.faar.service.b.a(SourceFile:188)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.qualcommlabs.usercontext.a.d.a.a(SourceFile:28)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.qualcommlabs.usercontext.ContextContentConnectorImpl.<init>(SourceFile:18)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.qualcommlabs.usercontext.ContextContentConnectorFactory.get(SourceFile:18)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.la.gimbalapp.MainActivity.didArrive(MainActivity.java:132)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.qrs.gimbalproximity.core.g.d.a(SourceFile:212)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.qrs.gimbalproximity.core.g.d$a.onReceive(SourceFile:58)
12-02 18:55:29.302: E/AndroidRuntime(20197): at android.support.v4.content.LocalBroadcastManager.executePendingBroadcasts(LocalBroadcastManager.java:297)
12-02 18:55:29.302: E/AndroidRuntime(20197): at android.support.v4.content.LocalBroadcastManager.access$000(LocalBroadcastManager.java:46)
12-02 18:55:29.302: E/AndroidRuntime(20197): at android.support.v4.content.LocalBroadcastManager$1.handleMessage(LocalBroadcastManager.java:116)
12-02 18:55:29.302: E/AndroidRuntime(20197): at android.os.Handler.dispatchMessage(Handler.java:102)
12-02 18:55:29.302: E/AndroidRuntime(20197): at android.os.Looper.loop(Looper.java:135)
12-02 18:55:29.302: E/AndroidRuntime(20197): at android.app.ActivityThread.main(ActivityThread.java:5274)
12-02 18:55:29.302: E/AndroidRuntime(20197): at java.lang.reflect.Method.invoke(Native Method)
12-02 18:55:29.302: E/AndroidRuntime(20197): at java.lang.reflect.Method.invoke(Method.java:372)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
12-02 18:55:29.302: E/AndroidRuntime(20197): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
12-02 18:55:29.302: E/AndroidRuntime(20197): Caused by: java.lang.NoSuchMethodException: values []
12-02 18:55:29.302: E/AndroidRuntime(20197): at java.lang.Class.getMethod(Class.java:664)
12-02 18:55:29.302: E/AndroidRuntime(20197): at java.lang.Class.getDeclaredMethod(Class.java:626)
12-02 18:55:29.302: E/AndroidRuntime(20197): at java.lang.Enum$1.create(Enum.java:41)
12-02 18:55:29.302: E/AndroidRuntime(20197): ... 26 more
I've been having similar issues. I contacted Gimbal's customer support. Here is the answer I received:
Sorry for the inconvenience and thanks for your feedback. Currently Gimbal Android Proximity SDK doesn’t support Android 5.0(Lollipop). we would recommend developers to use Android 4.4.3 or 4.4.4 version to compile apps using Gimbal Android proximity SDK.
Also, we are very interested to have Gimbal proximity work with Android 5.0.0 and are working to support with an SDK. We will let you know as soon as update is available.
Thanks
The Gimbal Team
Related
I have searched far and wide for this issue, but have not found a solution yet. I have an Android app (Cocos2dx) built with Eclipse (Mars) in C++.
While I know Fabric has stopped support for Eclipse, I am unable to move the project to Android Studio (I am not using Gradle either).
I have managed to add Fabric and Crashlytics into my project(including additions to the manifest, custom_rules and the likes) and have solved all the compilation issues regarding those two.
Whenever I run my app, it crashes on startup, with the following exception:
java.lang.NoClassDefFoundError: io.fabric.sdk.android.Kit[]
W/System.err( 9858): at com.infiapps.slotbonanza.SlotBonanza.onCreate(SlotBonanza.java:203)
W/System.err( 9858): at android.app.Activity.performCreate(Activity.java:5451)
W/System.err( 9858): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
W/System.err( 9858): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
W/System.err( 9858): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2386)
W/System.err( 9858): at android.app.ActivityThread.access$900(ActivityThread.java:169)
W/System.err( 9858): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
W/System.err( 9858): at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err( 9858): at android.os.Looper.loop(Looper.java:136)
W/System.err( 9858): at android.app.ActivityThread.main(ActivityThread.java:5476)
W/System.err( 9858): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 9858): at java.lang.reflect.Method.invoke(Method.java:515)
W/System.err( 9858): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
W/System.err( 9858): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
W/System.err( 9858): at dalvik.system.NativeStart.main(Native Method)
I saw other posts suggesting using MultiDex and I have tried solving my issue with that. I have also tried adding the Crashlytics.jar file into my build path, but that has not worked as well.
From reading other posts and looking online, I am aware this issue occurs because the Crashlytics libraries are found during compile time, but not during runtime.
Any help or suggestion would be greatly appreciated.
Thanks.
I keep getting this error:
12-02 17:34:55.648: E/AndroidRuntime(426): java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
12-02 17:34:55.648: E/AndroidRuntime(426): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:147)
12-02 17:34:55.648: E/AndroidRuntime(426): at android.support.v7.app.ActionBarActivityDelegateBase.onCreate(ActionBarActivityDelegateBase.java:138)
12-02 17:34:55.648: E/AndroidRuntime(426): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:123)
I have tried unimporting and reimporting android.support.v7.ActionBarActivity
I hope someone can guide me to what the error is
My app is running well on version below 5. But when i run it on Nexus 7 with version 5, it crashes with following error msg
12-02 18:24:01.941: E/StrictMode(14686): A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
12-02 18:24:01.941: E/StrictMode(14686): java.lang.Throwable: Explicit termination method 'close' not called
12-02 18:24:01.941: E/StrictMode(14686): at dalvik.system.CloseGuard.open(CloseGuard.java:184)
12-02 18:24:01.941: E/StrictMode(14686): at java.io.FileInputStream.<init>(FileInputStream.java:78)
12-02 18:24:01.941: E/StrictMode(14686): at com.android.okhttp.internal.DiskLruCache.get(DiskLruCache.java:417)
12-02 18:24:01.941: E/StrictMode(14686): at com.android.okhttp.HttpResponseCache.get(HttpResponseCache.java:164)
12-02 18:24:01.941: E/StrictMode(14686): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:190)
12-02 18:24:01.941: E/StrictMode(14686): at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
12-02 18:24:01.941: E/StrictMode(14686): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)
12-02 18:24:01.941: E/StrictMode(14686): at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:491)
12-02 18:24:01.941: E/StrictMode(14686): at android.media.MediaHTTPConnection.seekTo(MediaHTTPConnection.java:199)
12-02 18:24:01.941: E/StrictMode(14686): at android.media.MediaHTTPConnection.readAt(MediaHTTPConnection.java:315)
12-02 18:24:01.941: E/StrictMode(14686): at android.media.MediaHTTPConnection.native_readAt(Native Method)
12-02 18:24:01.941: E/StrictMode(14686): at android.media.MediaHTTPConnection.readAt(MediaHTTPConnection.java:304)
12-02 18:24:01.941: E/StrictMode(14686): at android.media.IMediaHTTPConnection$Stub.onTransact(IMediaHTTPConnection.java:72)
Can anyone suggest solution for this.
I have been trying to integrate Google Maps into Android App.I am Android noob and sort of confused on how to do this the right way.My first issue was that Using API 4.0 based emulator I accomplished the setup outlined here successfully, but when running it showed no map - only map controls.Then I found that it's impossible to debug Google Maps V2 on emulator.So I tried to run it on device.The device is HTC with Android 2.3.5 .The app had been constantly crashing once I uploaded it for test to the phone.Then here I found the guy using :
class="com.google.android.gms.maps.SupportMapFragment"
in the node ,rather than this:
android:name="com.google.android.gms.maps.MapFragment" //from Google maps setup webpage
Can anyone explain why?I Also found that I had to replace my activity super class from Activity to FragmentActivity which is also not covered in Google's docs.
Another thing:when selecting the device to debug on I see a warning icon for my HTC phone (see below)
What does the warning mean?
And here is my manifest :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.helloworld"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<permission
android:name="com.example.helloworld.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.example.helloworld.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"/>
<activity
android:name="com.example.helloworld.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Do all those Google official docs target only the latest APIs?
Here is the error stack trace ( if using setup as in Google Maps tutorial )
12-02 19:27:55.345: E/AndroidRuntime(11590): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
12-02 19:27:55.345: E/AndroidRuntime(11590): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607) 12-02
19:27:55.345: E/AndroidRuntime(11590): at
dalvik.system.NativeStart.main(Native Method) 12-02 19:27:55.345:
E/AndroidRuntime(11590): Caused by: android.view.InflateException:
Binary XML file line #3: Error inflating class fragment 12-02
19:27:55.345: E/AndroidRuntime(11590): at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
12-02 19:27:55.345: E/AndroidRuntime(11590): at
android.view.LayoutInflater.inflate(LayoutInflater.java:386) 12-02
19:27:55.345: E/AndroidRuntime(11590): at
android.view.LayoutInflater.inflate(LayoutInflater.java:320) 12-02
19:27:55.345: E/AndroidRuntime(11590): at
android.view.LayoutInflater.inflate(LayoutInflater.java:276) 12-02
19:27:55.345: E/AndroidRuntime(11590): at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:250)
12-02 19:27:55.345: E/AndroidRuntime(11590): at
android.app.Activity.setContentView(Activity.java:1742) 12-02
19:27:55.345: E/AndroidRuntime(11590): at
com.example.helloworld.MainActivity.onCreate(MainActivity.java:15)
12-02 19:27:55.345: E/AndroidRuntime(11590): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
12-02 19:27:55.345: E/AndroidRuntime(11590): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1836)
12-02 19:27:55.345: E/AndroidRuntime(11590): ... 11 more 12-02
19:27:55.345: E/AndroidRuntime(11590): Caused by:
java.lang.ClassNotFoundException: android.view.fragment in loader
dalvik.system.PathClassLoader[/data/app/com.example.helloworld-2.apk]
12-02 19:27:55.345: E/AndroidRuntime(11590): at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
12-02 19:27:55.345: E/AndroidRuntime(11590): at
java.lang.ClassLoader.loadClass(ClassLoader.java:551) 12-02
19:27:55.345: E/AndroidRuntime(11590): at
java.lang.ClassLoader.loadClass(ClassLoader.java:511) 12-02
19:27:55.345: E/AndroidRuntime(11590): at
android.view.LayoutInflater.createView(LayoutInflater.java:471) 12-02
19:27:55.345: E/AndroidRuntime(11590): at
android.view.LayoutInflater.onCreateView(LayoutInflater.java:549)
12-02 19:27:55.345: E/AndroidRuntime(11590): at
com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
12-02 19:27:55.345: E/AndroidRuntime(11590): at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
12-02 19:27:55.345: E/AndroidRuntime(11590): ... 19 more
This question already has an answer here:
how to show alert inside an activity group?
(1 answer)
Closed 8 years ago.
In my activity I am calling webservices. So after the webservice returns the result, I have to show an alert. Since alert is UI part, I think inside onPostExecute() I have to write the alert code. But when I do like that error is coming.
Error shown:
12-02 09:59:08.508: ERROR/AndroidRuntime(451): Uncaught handler: thread main exiting
due to uncaught exception
12-02 09:59:08.528: ERROR/AndroidRuntime(451):
android.view.WindowManager$BadTokenException: Unable to add window -- token
android.app.LocalActivityManager$LocalActivityRecord#4378eb50 is not valid; is your
activity running?
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
android.view.ViewRoot.setView(ViewRoot.java:456)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
android.view.Window$LocalWindowManager.addView(Window.java:409)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
android.app.Dialog.show(Dialog.java:238)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
android.app.AlertDialog$Builder.show(AlertDialog.java:802)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at com.myapp.android.activities.Register$PostCodeTask.onPostExecute(Register.java:291)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at com.myapp.android.activities.Register$PostCodeTask.onPostExecute(Register.java:1)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
android.os.AsyncTask.finish(AsyncTask.java:416)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
android.os.AsyncTask.access$300(AsyncTask.java:127)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:428)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
android.os.Handler.dispatchMessage(Handler.java:99)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
android.os.Looper.loop(Looper.java:123)
android.app.ActivityThread.main(ActivityThread.java:4203)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
java.lang.reflect.Method.invokeNative(Native Method)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
java.lang.reflect.Method.invoke(Method.java:521)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
12-02 09:59:08.528: ERROR/AndroidRuntime(451): at dalvik.system.NativeStart.main(Native
Method)
Can anyone please help to solve my issue. Thanks in advance :)
You need to execute your alert code in UI thread. There are few ways of doing it for example
runOnUiThread(new Runnable() {
public void run() {
Toast.makeText(MyActivity.this, "Hello there", Toast.LENGTH_LONG).show();
}
});