Get session info failed - java

I'm trying to run the opentok android beta but I keep getting
07-28 19:46:03.703: W/opentok-session(1707): get session info failed
07-28 19:46:03.703: W/opentok-session(1707): com.opentok.webservices.TokenAuthRequest$TokenAuthRequestException: Error in response: Invalid Token: Sentinel missing
07-28 19:46:03.703: W/opentok-session(1707): at com.opentok.webservices.TokenAuthRequest.issue(TokenAuthRequest.java:99)
07-28 19:46:03.703: W/opentok-session(1707): at com.opentok.webservices.SessionInfo.<init>(SessionInfo.java:45)
07-28 19:46:03.703: W/opentok-session(1707): at com.opentok.webservices.SessionInfo.fetch(SessionInfo.java:31)
07-28 19:46:03.703: W/opentok-session(1707): at com.opentok.impl.SessionImpl.attach(SessionImpl.java:99)
07-28 19:46:03.703: W/opentok-session(1707): at com.opentok.impl.SessionImpl.access$000(SessionImpl.java:55)
07-28 19:46:03.703: W/opentok-session(1707): at com.opentok.impl.SessionImpl$1.run(SessionImpl.java:86)
07-28 19:46:03.703: W/opentok-session(1707): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
07-28 19:46:03.703: W/opentok-session(1707): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
07-28 19:46:03.703: W/opentok-session(1707): at java.lang.Thread.run(Thread.java:841)
07-28 19:46:03.834: E/demo-hello-world(1707): session failed! com.opentok.android.OpentokException: Authorization Failure - Invalid credentials were provided.
I know it means that the session id and the token I'm providing is wrong but I don't know who that can be because I'm getting it from the opentok dashboard.
EDIT
This is the session id I used 1_MX4zNjA3NDkwMn4xMjcuMC4wLjF-TW9uIEp1bCAyOSAwNDoxNjozMiBQRFQgMjAxM34wLjIzMTkwMzMxfg
and the token I used
cGFydG5lcl9pZD0zNjA3NDkwMiZzZGtfdmVyc2lvbj10YnJ1YnktdGJyYi12MC45MS4yMDExLTAyLTE3JnNpZz0wMzY4NzQzYjFiNDgzNDI3NDAzZWU0ZWM0Yzg1OGVlZGI5YjI0ZGQ1OnJvbGU9cHVibGlzaGVyJnNlc3Npb25faWQ9MV9NWDR6TmpBM05Ea3dNbjR4TWpjdU1DNHdMakYtVFc5dUlFcDFiQ0F5T1NBd05Eb3hOam96TWlCUVJGUWdNakF4TTM0d0xqSXpNVGt3TXpNeGZnJmNyZWF0ZV90aW1lPTEzNzUwOTY2NDYmbm9uY2U9MC44MjM1NjI5MDY2MTA3ODcxJmV4cGlyZV90aW1lPTEzNzUxODMwMjUmY29ubmVjdGlvbl9kYXRhPQ

A valid token will start with T1==, the token you've shown does not. Can you go back to the Dashboard, create a new token for that session, paste the entire string into your application code, and try again?

Related

android version compatibility

The question is myapp sometimes run well and sometimes doesn't.I used ionic+cordova+angular to do it. It does not work at 5.0.1 version.
This is the logcat when i test with android studio
07-28 15:55:19.894 9987-9987/? E/Zygote: MountEmulatedStorage()
07-28 15:55:19.894 9987-9987/? E/Zygote: v2
07-28 15:55:19.904 9987-9987/? E/Zygote: accessInfo : 0
07-28 15:55:19.904 9987-9987/? E/SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
07-28 15:55:20.084 9987-9987/io.ionic.starter E/SysUtils: ApplicationContext is null in ApplicationStatus
07-28 15:55:20.164 9987-9987/io.ionic.starter E/chromium: [ERROR:browser_gpu_channel_host_factory.cc(258)] Failed to init browser shader disk cache.
07-28 15:55:20.194 9987-9987/io.ionic.starter E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
07-28 15:55:20.194 9987-10081/io.ionic.starter E/ActivityThread: Failed to find provider info for com.google.settings
ionic cordova plugin add cordova-plugin-crosswalk-webview --save Add this will be work.

Android IOException is null, Throwing NullPointerException

I'm working on an application for Android and I'm having an AsyncTask connect to a server through a client socket in the doInBackground method.
All variables that are being used have been set and I have checked in real time that they are valid before being used. The weird thing is that after trying to create the socket with the designated host/port, it immediately throws an IOException, which in itself is not a problem :P but the value ex is null. I have never seen anything like this and I found some similar cases on google, but none of them yielded a solution.
The code that is throwing the exception,as well as the catch block:
#Override
protected Socket doInBackground(Void... params) {
Socket sock = null;
try {
sock = new Socket("10.0.0.86", 44444);
} catch (UnknownHostException ex) {
ex.printStackTrace();
} catch(IOException ex) {
ex.printStackTrace();
}
return sock;
}
The rest of the code is nothing of help, it's just some getter/setters. Here's the log from the android device:
07-28 03:30:23.438
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
Sending WAIT chunk 07-28 03:30:23.438
9514-9520/com.TestApplication.VEStudio.TestApplication I/dalvikvm﹕
Debugger is active 07-28 03:30:23.438
9514-9514/com.TestApplication.VEStudio.TestApplication
W/ActivityThread﹕ Application
com.TestApplication.VEStudio.TestApplication is waiting for the
debugger on port 8100... 07-28 03:30:23.638
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
Debugger has connected 07-28 03:30:23.638
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:23.838
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:24.038
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:24.238
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:24.438
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:24.638
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:24.838
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
waiting for debugger to settle... 07-28 03:30:25.038
9514-9514/com.TestApplication.VEStudio.TestApplication I/System.out﹕
debugger has settled (1482) 07-28 03:30:25.238
9514-9514/com.TestApplication.VEStudio.TestApplication I/Adreno-EGL﹕
: EGL 1.4 QUALCOMM build: ()
OpenGL ES Shader Compiler Version: E031.24.00.06
Build Date: 02/12/14 Wed
Local Branch: au090
Remote Branch:
Local Patches:
Reconstruct Branch: 07-28 03:30:25.268 9514-9514/com.TestApplication.VEStudio.TestApplication
D/OpenGLRenderer﹕ Enabling debug mode 0 07-28 03:30:25.308
9514-9514/com.TestApplication.VEStudio.TestApplication
D/OpenGLRenderer﹕ GL error from OpenGLRenderer: 0x502 07-28
03:30:25.308 9514-9514/com.TestApplication.VEStudio.TestApplication
E/OpenGLRenderer﹕ GL_INVALID_OPERATION 07-28 03:30:25.318
9514-9514/com.TestApplication.VEStudio.TestApplication
I/ActivityManager﹕ Timeline: Activity_idle id:
android.os.BinderProxy#43682588 time:268397923 07-28 03:30:26.468
9514-9514/com.TestApplication.VEStudio.TestApplication
I/ActivityManager﹕ Timeline: Activity_idle id:
android.os.BinderProxy#43682588 time:268399075 07-28 03:30:29.908
9514-9514/com.TestApplication.VEStudio.TestApplication
I/Choreographer﹕ Skipped 150 frames! The application may be doing too
much work on its main thread. 07-28 03:30:33.538
9514-9913/com.TestApplication.VEStudio.TestApplication W/dalvikvm﹕
threadid=15: thread exiting with uncaught exception (group=0x41e98d88)
07-28 03:30:33.578
9514-9913/com.TestApplication.VEStudio.TestApplication
E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #3
Process: com.TestApplication.VEStudio.TestApplication, PID: 9514
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.NullPointerException
at com.TestApplication.VEStudio.TestApplication.Networking.doInBackground(Networking.java:51)
at com.TestApplication.VEStudio.TestApplication.Networking.doInBackground(Networking.java:12)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:841) 07-28 03:35:33.628 9514-9913/com.TestApplication.VEStudio.TestApplication
I/Process﹕ Sending signal. PID: 9514 SIG: 9
Any help at all with this issue would be greatly appreciated, and hopefully someone in the future will need the same intel.

AdMob taking space in layout, but no ad is actually appearing?

First off - I've been reading through questions thick and thin since last night. To the best of my knowledge, I've done everything right and tried everything else.
I have set the background color of the AdView element as #000000, and a black rectangle appears in the right place with the proper dimensions.
I'm 99% positive that it has enough space.
XML:
<com.google.android.gms.ads.AdView
android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="xxxxxxxxxxxxxxxxxxxxx"
android:visibility="visible"
android:background="#000000" >
</com.google.android.gms.ads.AdView>
Java:
AdView adView = (AdView)this.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice("BD0C01C19D6DD373FC42905822D0D2F3")
.build();
adView.loadAd(adRequest);
LogCat: (Google Play Services not being found can be ignored according to the google API/docs)
06-04 13:11:41.070: E/ResourceType(4968): 0x5acad0d8: Failed to ResTable::remove() cookie = 0x3, not last table. mHeaders.size() = 4. Warning for spontaneous crashes when the garbage collector runs.
06-04 13:11:41.070: E/asset(4968): Error removing runtime skin resource (cookie 0x3)
06-04 13:11:41.070: I/asset(4968): Problem removing all runtime skin resources
06-04 13:11:51.031: D/dalvikvm(4968): DexOpt: --- BEGIN 'ads-1359089110.jar' (bootstrap=0) ---
06-04 13:11:53.173: D/dalvikvm(4968): DexOpt: --- END 'ads-1359089110.jar' (success) ---
06-04 13:11:53.173: D/dalvikvm(4968): DEX prep '/data/data/lqf.liquidformula.converter/cache/ads-1359089110.jar': unzip in 0ms, rewrite 2147ms
06-04 13:11:53.223: I/Ads(4968): Use AdRequest.Builder.addTestDevice("BD0C01C19D6DD373FC42905822D0D2F3") to get test ads on this device.
06-04 13:11:53.233: I/Ads(4968): Starting ad request.
06-04 13:11:53.404: D/webcoreglue(4968): netstack: Memory Cache feature is ON
06-04 13:11:53.604: E/GooglePlayServicesUtil(4968): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
06-04 13:11:53.614: D/JSENGINE(4968): qualcomm.jsengine.version:C.2-patch35-git:7b7ad6f
06-04 13:11:54.815: D/libEGL(4968): loaded /vendor/lib/egl/libEGL_adreno.so
06-04 13:11:54.815: D/libEGL(4968): loaded /vendor/lib/egl/libGLESv1_CM_adreno.so
06-04 13:11:54.825: D/libEGL(4968): loaded /vendor/lib/egl/libGLESv2_adreno.so
06-04 13:11:54.845: I/Adreno-EGL(4968): <qeglDrvAPI_eglInitialize:316>: EGL 1.4 QUALCOMM build: (CL4169980)
06-04 13:11:54.845: I/Adreno-EGL(4968): OpenGL ES Shader Compiler Version: 17.01.10.SPL
06-04 13:11:54.845: I/Adreno-EGL(4968): Build Date: 11/04/13 Mon
06-04 13:11:54.845: I/Adreno-EGL(4968): Local Branch:
06-04 13:11:54.845: I/Adreno-EGL(4968): Remote Branch:
06-04 13:11:54.845: I/Adreno-EGL(4968): Local Patches:
06-04 13:11:54.845: I/Adreno-EGL(4968): Reconstruct Branch:
06-04 13:11:54.875: D/HostStatisticManager(4968): netstack: DNS Host Prioritization is: ON, Version: 5.0.1
06-04 13:11:54.875: I/(4968): netstack: LIB_MGR - Lib loaded: libdnshostprio.so
06-04 13:11:54.875: I/(4968): netstack: STAT_HUB - Succeeded to load plugin: libdnshostprio.so
06-04 13:11:54.875: E/(4968): netstack: LIB_MGR - Error loading lib spl_proc_plugin.so
06-04 13:11:54.875: E/(4968): netstack: STAT_HUB - Failed to load plugin: spl_proc_plugin.so
06-04 13:11:54.885: I/(4968): netstack: LIB_MGR - Lib loaded: pp_proc_plugin.so
06-04 13:11:54.885: I/(4968): netstack: STAT_HUB - Succeeded to load plugin: pp_proc_plugin.so
06-04 13:11:54.885: E/(4968): netstack: STAT_HUB - App lqf.liquidformula.converter isn't supported
06-04 13:11:54.905: D/OpenGLRenderer(4968): Enabling debug mode 0
06-04 13:11:55.456: I/dalvikvm(4968): Total arena pages for JIT: 11
06-04 13:11:55.456: I/dalvikvm(4968): Total arena pages for JIT: 12
06-04 13:11:55.456: I/dalvikvm(4968): Total arena pages for JIT: 13
06-04 13:11:55.456: E/GooglePlayServicesUtil(4968): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
06-04 13:11:55.466: E/GooglePlayServicesUtil(4968): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
06-04 13:12:00.161: V/chromium_net(4968): external/chromium/net/host_resolver_helper/host_resolver_helper.cc:66: [0604/131200:INFO:host_resolver_helper.cc(66)] DNSPreResolver::Init got hostprovider:0x6035400c
06-04 13:12:00.161: V/chromium_net(4968): external/chromium/net/base/host_resolver_impl.cc:1510: [0604/131200:INFO:host_resolver_impl.cc(1510)] HostResolverImpl::SetPreresolver preresolver:0x605da740
06-04 13:12:00.171: I/QCNEA(4968): |CAC| CAS is enabled
06-04 13:12:00.171: I/QCNEA(4968): |CAC| [CNE CLIENT STATE MACHINE] transition NOT_CONNECTED_NOT_ATTEMPTED -> CONNECTING
06-04 13:12:00.171: D/QCNEA(4968): |CAC| Connected to server socket: 86
06-04 13:12:00.171: I/QCNEA(4968): |CAC| [CNE CLIENT STATE MACHINE] transition CONNECTING -> CONNECTED_PENDING_PERM_RESPONSE
06-04 13:12:00.171: D/QCNEA(4968): |CAC| In monitor thread, performing select
06-04 13:12:00.171: D/QCNEA(4968): |CAC| readCallback: read len:12, ret:0, errno:0
06-04 13:12:00.171: I/QCNEA(4968): |CAC| [CNE CLIENT STATE MACHINE] transition CONNECTED_PENDING_PERM_RESPONSE -> NOT_CONNECTED_ACCESS_DENIED
06-04 13:12:00.171: I/QCNEA(4968): |CAC| client permission denied.
06-04 13:12:00.171: D/netstack(4968): netstack: Request Priority is ON
06-04 13:12:00.171: D/QCNEA(4968): |CAC| readCallback: read len:0, ret:0, errno:0
06-04 13:12:00.171: E/QCNEA(4968): |CAC| readCallback: end of stream
06-04 13:12:00.171: V/QCNEA(4968): |CAC| Dispatching Latency Service Status Update [status:SERVICE_STOPPED]
06-04 13:12:00.171: V/QCNEA(4968): |CAC| Dispatching Bitrate Service Status Update [status:SERVICE_STOPPED]
06-04 13:12:00.171: V/QCNEA(4968): |CAC| Clients reset
06-04 13:12:00.171: D/QCNEA(4968): |CAC| Monitor loop is terminating
06-04 13:12:00.171: D/(4968): external/chromium/net/socket/tcp_fin_aggregation_factory.cc: libtcpfinaggr.so successfully loaded
06-04 13:12:00.171: D/(4968): external/chromium/net/socket/tcp_fin_aggregation_factory.cc,: TCP Fin Aggregation initializing method was found in libtcpfinaggr.so
06-04 13:12:00.171: D/TCPFinAggregation(4968): netstack: TCPFinAggregation is 1, Version 5.0.1
06-04 13:12:00.171: D/TCPFinAggregation(4968): system property net.tcp.fin.aggregation.wait was set, value: 20
06-04 13:12:00.171: D/TCPFinAggregation(4968): system property net.tcp.fin.aggregation.close was set, value: 300
06-04 13:12:00.171: D/TCPFinAggregation(4968): netstack: CloseUnusedSockets is ON, (TCPFinAggregation), Version 5.0.1
06-04 13:12:00.171: D/TCPFinAggregation(4968): Failed to get network status! received ret: -6
06-04 13:12:00.171: D/Socket_Pool(4968): netstack: CloseUnusedSockets is ON
06-04 13:12:00.171: D/Socket_Pool(4968): netstack: system net.statistics value: 0
06-04 13:12:00.171: D/Socket_Pool(4968): netstack: CloseUnusedSockets is ON
06-04 13:12:00.171: D/Socket_Pool(4968): netstack: system net.statistics value: 0
06-04 13:12:00.171: D/(4968): external/chromium/net/http/http_getzip_factory.cc: libgetzip.so successfully loaded
06-04 13:12:00.171: D/(4968): external/chromium/net/http/http_getzip_factory.cc,: GETzip initializing method was found in libgetzip.so
06-04 13:12:00.171: D/(4968): netstack: Getzip is: ON, Version: 5.0.1
06-04 13:12:00.701: D/(4968): netstack: Early Connections is: ON, Version: 5.0.1, Param: 3
06-04 13:12:00.761: I/qtaguid(4968): Failed write_ctrl(t 93 43735651975168 2358) res=-1 errno=1
06-04 13:12:00.761: I/qtaguid(4968): Tagging socket 93 with tag 27c700000000(10183) for uid 2358 failed errno=-1
06-04 13:12:00.761: I/qtaguid(4968): Failed write_ctrl(t 95 43735651975168 2358) res=-1 errno=1
06-04 13:12:00.761: I/qtaguid(4968): Tagging socket 95 with tag 27c700000000(10183) for uid 2358 failed errno=-1
06-04 13:12:00.761: I/qtaguid(4968): Failed write_ctrl(t 96 43735651975168 2358) res=-1 errno=1
06-04 13:12:00.761: I/qtaguid(4968): Tagging socket 96 with tag 27c700000000(10183) for uid 2358 failed errno=-1
06-04 13:12:01.012: I/Ads(4968): Scheduling ad refresh 60000 milliseconds from now.
06-04 13:12:01.012: I/Ads(4968): Ad finished loading.
06-04 13:12:10.882: I/qtaguid(4968): Failed write_ctrl(u 95) res=-1 errno=22
06-04 13:12:10.882: I/qtaguid(4968): Untagging socket 95 failed errno=-22
06-04 13:12:10.882: I/qtaguid(4968): Failed write_ctrl(u 96) res=-1 errno=22
06-04 13:12:10.882: I/qtaguid(4968): Untagging socket 96 failed errno=-22
you have to change your layout as follows,
<LinearLayout
android:id="#+id/lladv"
android:layout_alignParentBottom="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<com.google.ads.AdView
android:id="#+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="xxxxxxxxxxxxxxxxxxxxx" />
</LinearLayout>

android opengl error (Application unexpectedly stopped)

I'm developing this game for android. I'm following a tutorial on how to make menus. And this is the code. There's no errors just warning in the code so I dont know what to do.
08-23 21:31:41.099: E/System(79): Failure starting core service
08-23 21:31:41.099: E/System(79): java.lang.SecurityException
08-23 21:31:41.099: E/System(79): at android.os.BinderProxy.transact(Native Method)
08-23 21:31:41.099: E/System(79): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
08-23 21:31:41.099: E/System(79): at android.os.ServiceManager.addService(ServiceManager.java:72)
08-23 21:31:41.099: E/System(79): at com.android.server.ServerThread.run(SystemServer.java:206)
08-23 21:31:41.139: E/EventHub(79): could not get driver version for /dev/input/mouse0, Not a typewriter
08-23 21:31:41.139: E/EventHub(79): could not get driver version for /dev/input/mice, Not a typewriter
08-23 21:31:42.049: E/SoundPool(79): error loading /system/media/audio/ui/Effect_Tick.ogg
08-23 21:31:42.049: E/SoundPool(79): error loading /system/media/audio/ui/KeypressStandard.ogg
08-23 21:31:42.069: E/SoundPool(79): error loading /system/media/audio/ui/KeypressSpacebar.ogg
08-23 21:31:42.069: E/SoundPool(79): error loading /system/media/audio/ui/KeypressDelete.ogg
08-23 21:31:42.079: E/SoundPool(79): error loading /system/media/audio/ui/KeypressReturn.ogg
08-23 21:31:42.159: E/UsbObserver(79): java.lang.NullPointerException
08-23 21:31:42.159: E/UsbObserver(79): at com.android.server.UsbObserver.init(UsbObserver.java:131)
08-23 21:31:42.159: E/UsbObserver(79): at com.android.server.UsbObserver.<init>(UsbObserver.java:65)
08-23 21:31:42.159: E/UsbObserver(79): at com.android.server.ServerThread.run(SystemServer.java:402)
08-23 21:31:47.820: E/ThrottleService(79): Could not open GPS configuration file /etc/gps.conf
08-23 21:31:47.880: E/ThrottleService(79): Error reading data file
08-23 21:31:49.250: E/logwrapper(194): executing /system/bin/tc failed: No such file or directory
08-23 21:31:49.320: E/logwrapper(195): executing /system/bin/tc failed: No such file or directory
08-23 21:31:49.370: E/logwrapper(196): executing /system/bin/tc failed: No such file or directory
08-23 21:31:57.759: E/logwrapper(225): executing /system/bin/tc failed: No such file or directory
08-23 21:31:57.889: E/logwrapper(226): executing /system/bin/tc failed: No such file or directory
08-23 21:31:58.000: E/logwrapper(227): executing /system/bin/tc failed: No such file or directory
08-23 21:32:41.593: E/MetadataRetrieverClient(34): failed to extract an album art
08-23 21:33:17.502: E/ThrottleService(79): Error reading data file
08-23 22:06:08.702: E/AndroidRuntime(414): FATAL EXCEPTION: GLThread 13
08-23 22:06:08.702: E/AndroidRuntime(414): java.lang.IllegalArgumentException: No EGLConfig found!
08-23 22:06:08.702: E/AndroidRuntime(414): at org.andengine.opengl.view.ConfigChooser.chooseConfig(ConfigChooser.java:183)
08-23 22:06:08.702: E/AndroidRuntime(414): at org.andengine.opengl.view.ConfigChooser.chooseConfig(ConfigChooser.java:157)
08-23 22:06:08.702: E/AndroidRuntime(414): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:919)
08-23 22:06:08.702: E/AndroidRuntime(414): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1264)
08-23 22:06:08.702: E/AndroidRuntime(414): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
if you are trying this in an emulator - it's probably not configured properly. See my answer to this question - Android AndEngine problems: java.lang.IllegalArgumentException: No EGLConfig Found
Changed already the target SDK, enable GPU Host, the processor to Intel. Still getting errors
08-25 01:41:48.889: ERROR/Zygote(793): setreuid() failed. errno: 30
08-25 01:42:01.820: ERROR/Zygote(793): setreuid() failed. errno: 30
08-25 01:42:04.430: ERROR/BatteryService(853): acOnlinePath not found
08-25 01:42:04.430: ERROR/BatteryService(853): usbOnlinePath not found
08-25 01:42:04.430: ERROR/BatteryService(853): batteryStatusPath not found
08-25 01:42:04.430: ERROR/BatteryService(853): batteryHealthPath not found
08-25 01:42:04.430: ERROR/BatteryService(853): batteryPresentPath not found
08-25 01:42:04.430: ERROR/BatteryService(853): batteryCapacityPath not found
08-25 01:42:04.430: ERROR/BatteryService(853): batteryVoltagePath not found
08-25 01:42:04.430: ERROR/BatteryService(853): batteryTemperaturePath not found
08-25 01:42:04.430: ERROR/BatteryService(853): batteryTechnologyPath not found
08-25 01:42:04.770: ERROR/EGL_emulation(853): rcMakeCurrent returned EGL_FALSE
08-25 01:42:04.770: ERROR/EGL_emulation(853): tid 874: eglMakeCurrent(984): error 0x3006 (EGL_BAD_CONTEXT)
08-25 01:42:04.770: ERROR/libEGL(853): call to OpenGL ES API with no current context (logged once per thread)
08-25 01:42:04.770: ERROR/libEGL(853): call to OpenGL ES API with no current context (logged once per thread)
08-25 01:42:04.770: ERROR/libEGL(853): call to OpenGL ES API with no current context (logged once per thread)
08-25 01:42:04.770: ERROR/libEGL(853): call to OpenGL ES API with no current context (logged once per thread)
08-25 01:43:01.773: ERROR/Zygote(889): setreuid() failed. errno: 30

Application crashes when is executed using Google maps api v2

I am trying to basically load a map using Google maps api v2 so i can start working on a more complex application.
My problem is that i followed all the instructions in:
https://developers.google.com/maps/documentation/android/
to setup the new settings for the google map api v2 that uses Google play lib.
Everything is set up fine but when i run the application it crashes(myapp stoped working)
I am using intellij so the applications was signed through "build|Generate signed apk" and to get my SHA1 code i used the file that is generated when the Generate signed apk is selected. I created a new project in Google console named MapTest to get the api key and placed that in the manifest as specified.
Now i know that the emulators usually are missing some staff such as the openGL ES so i installed the app on my phone (Galaxy s2) and the application is still crashing.
ps the google play lib was added
Emulator is google api 15 and everything is updated to latest versions.
Any help or input is deeply appreciated.
Bellow i am including my xml files so you can see if there is anything wrong.
main xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.MapFragment"/>
</LinearLayout>
AndroidManifest xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.MapTest"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:targetSdkVersion="15" android:minSdkVersion="8"/>
<application android:label="#string/app_name" android:icon="#drawable/ic_launcher">
<uses-library android:name="com.google.android.maps"/>
<activity android:name="MyActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="my api key goes here"/>
</application>
<permission
android:name="com.example.MapTest.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.example.MapTest.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<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"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
</manifest>
MyActivity class
nothing really change tho included just in case
package com.example.MapTest;
import android.app.Activity;
import android.os.Bundle;
import com.google.android.gms.maps.MapFragment;
public class MyActivity extends Activity {
/**
* Called when the activity is first created.
*/
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
the log of the emulator
01-09 22:16:54.269: DEBUG/AndroidRuntime(1779): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
01-09 22:16:54.269: DEBUG/AndroidRuntime(1779): CheckJNI is ON
01-09 22:16:55.766: DEBUG/AndroidRuntime(1779): Calling main entry com.android.commands.pm.Pm
01-09 22:16:56.059: DEBUG/dalvikvm(1031): GC_EXPLICIT freed 416K, 15% free 11721K/13703K, paused 9ms+19ms
01-09 22:16:56.099: WARN/ActivityManager(1031): No content provider found for permission revoke: file:///data/local/tmp/com.example.MapTest
01-09 22:16:56.139: WARN/ActivityManager(1031): No content provider found for permission revoke: file:///data/local/tmp/com.example.MapTest
01-09 22:16:56.379: INFO/PackageManager(1031): Removing non-system package:com.example.MapTest
01-09 22:16:56.379: INFO/ActivityManager(1031): Force stopping package com.example.MapTest uid=10044
01-09 22:16:56.529: INFO/PackageManager(1031): Package com.example.MapTest codePath changed from /data/app/com.example.MapTest-2.apk to /data/app/com.example.MapTest-1.apk; Retaining data and using new
01-09 22:16:56.529: INFO/PackageManager(1031): Running dexopt on: com.example.MapTest
01-09 22:16:57.781: DEBUG/dalvikvm(1790): DexOpt: load 230ms, verify+opt 493ms
01-09 22:16:57.809: WARN/PackageManager(1031): Code path for pkg : com.example.MapTest changing from /data/app/com.example.MapTest-2.apk to /data/app/com.example.MapTest-1.apk
01-09 22:16:57.809: WARN/PackageManager(1031): Resource path for pkg : com.example.MapTest changing from /data/app/com.example.MapTest-2.apk to /data/app/com.example.MapTest-1.apk
01-09 22:16:57.829: INFO/ActivityManager(1031): Force stopping package com.example.MapTest uid=10044
01-09 22:16:57.939: DEBUG/PackageManager(1031): New package installed in /data/app/com.example.MapTest-1.apk
01-09 22:16:57.949: WARN/PackageManager(1031): Unknown permission android.permission.ADD_SYSTEM_SERVICE in package com.android.phone
01-09 22:16:57.949: WARN/PackageManager(1031): Unknown permission com.android.smspush.WAPPUSH_MANAGER_BIND in package com.android.phone
01-09 22:16:57.959: WARN/PackageManager(1031): Unknown permission com.android.vending.billing.BILLING_ACCOUNT_SERVICE in package com.google.android.gsf.login
01-09 22:16:57.959: WARN/PackageManager(1031): Unknown permission com.android.vending.billing.ADD_CREDIT_CARD in package com.google.android.gsf.login
01-09 22:16:57.959: WARN/PackageManager(1031): Unknown permission com.android.vending.billing.IBillingAccountService.BIND2 in package com.google.android.gsf.login
01-09 22:16:57.959: WARN/PackageManager(1031): Not granting permission android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS to package com.android.browser (protectionLevel=2 flags=0x9be45)
01-09 22:16:57.959: WARN/PackageManager(1031): Not granting permission android.permission.BIND_APPWIDGET to package com.android.widgetpreview (protectionLevel=3 flags=0x28be44)
01-09 22:16:57.989: WARN/PackageManager(1031): Unknown permission com.android.providers.im.permission.READ_ONLY in package com.google.android.apps.maps
01-09 22:16:57.989: WARN/PackageManager(1031): Not granting permission android.permission.DEVICE_POWER to package com.android.deskclock (protectionLevel=2 flags=0x8be45)
01-09 22:16:58.299: DEBUG/dalvikvm(1031): GC_CONCURRENT freed 544K, 15% free 11758K/13703K, paused 9ms+12ms
01-09 22:16:58.489: INFO/ActivityManager(1031): Force stopping package com.example.MapTest uid=10044
01-09 22:16:58.639: DEBUG/dalvikvm(1126): GC_EXPLICIT freed 250K, 7% free 11414K/12231K, paused 5ms+7ms
01-09 22:16:58.869: DEBUG/dalvikvm(1166): GC_EXPLICIT freed 172K, 4% free 9398K/9735K, paused 10ms+9ms
01-09 22:16:59.159: DEBUG/dalvikvm(1031): GC_EXPLICIT freed 191K, 15% free 11704K/13703K, paused 7ms+14ms
01-09 22:16:59.259: DEBUG/PackageManager(1031): generateServicesMap(android.accounts.AccountAuthenticator): 3 services unchanged
01-09 22:16:59.409: DEBUG/PackageManager(1031): generateServicesMap(android.content.SyncAdapter): 5 services unchanged
01-09 22:16:59.431: DEBUG/BackupManagerService(1031): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.example.MapTest flg=0x10000010 (has extras) }
01-09 22:16:59.459: DEBUG/PackageManager(1031): generateServicesMap(android.accounts.AccountAuthenticator): 3 services unchanged
01-09 22:16:59.479: DEBUG/PackageManager(1031): generateServicesMap(android.content.SyncAdapter): 5 services unchanged
01-09 22:16:59.599: DEBUG/BackupManagerService(1031): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.MapTest flg=0x10000010 (has extras) }
01-09 22:16:59.629: VERBOSE/BackupManagerService(1031): updatePackageParticipantsLocked: #1
01-09 22:17:00.642: WARN/RecognitionManagerService(1031): no available voice recognition services found
01-09 22:17:00.889: DEBUG/BackupManagerService(1031): Received broadcast Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.example.MapTest flg=0x10000010 (has extras) }
01-09 22:17:00.889: VERBOSE/BackupManagerService(1031): updatePackageParticipantsLocked: #1
01-09 22:17:01.519: DEBUG/dalvikvm(1031): GC_EXPLICIT freed 528K, 14% free 11847K/13703K, paused 7ms+17ms
01-09 22:17:02.069: DEBUG/AndroidRuntime(1779): Shutting down VM
01-09 22:17:02.089: INFO/AndroidRuntime(1779): NOTE: attach of thread 'Binder Thread #3' failed
01-09 22:17:02.089: DEBUG/dalvikvm(1779): GC_CONCURRENT freed 101K, 78% free 456K/2048K, paused 2ms+4ms
01-09 22:17:02.099: DEBUG/jdwp(1779): Got wake-up signal, bailing out of select
01-09 22:17:02.099: DEBUG/dalvikvm(1779): Debugger has detached; object registry had 1 entries
01-09 22:17:02.789: DEBUG/AndroidRuntime(1795): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
01-09 22:17:02.789: DEBUG/AndroidRuntime(1795): CheckJNI is ON
01-09 22:17:03.949: DEBUG/AndroidRuntime(1795): Calling main entry com.android.commands.am.Am
01-09 22:17:03.989: INFO/ActivityManager(1031): START {flg=0x10000000 cmp=com.example.MapTest/.MyActivity} from pid 1795
01-09 22:17:04.029: WARN/WindowManager(1031): Failure taking screenshot for (180x300) to layer 21005
01-09 22:17:04.111: DEBUG/AndroidRuntime(1795): Shutting down VM
01-09 22:17:04.139: DEBUG/dalvikvm(1806): Not late-enabling CheckJNI (already on)
01-09 22:17:04.139: INFO/AndroidRuntime(1795): NOTE: attach of thread 'Binder Thread #3' failed
01-09 22:17:04.159: DEBUG/dalvikvm(1795): GC_CONCURRENT freed 101K, 77% free 486K/2048K, paused 1ms+5ms
01-09 22:17:04.159: DEBUG/jdwp(1795): Got wake-up signal, bailing out of select
01-09 22:17:04.159: DEBUG/dalvikvm(1795): Debugger has detached; object registry had 1 entries
01-09 22:17:04.209: INFO/ActivityManager(1031): Start proc com.example.MapTest for activity com.example.MapTest/.MyActivity: pid=1806 uid=10044 gids={3003, 1015}
01-09 22:17:04.649: WARN/NetworkManagementSocketTagger(1031): setKernelCountSet(10044, 1) failed with errno -2
01-09 22:17:05.269: INFO/Process(1031): Sending signal. PID: 1806 SIG: 3
01-09 22:17:05.309: INFO/dalvikvm(1806): threadid=3: reacting to signal 3
01-09 22:17:05.429: INFO/dalvikvm(1806): Wrote stack traces to '/data/anr/traces.txt'
01-09 22:17:05.599: WARN/dalvikvm(1806): VFY: unable to resolve static field 40 (MapAttrs) in Lcom/google/android/gms/R$styleable;
01-09 22:17:05.599: DEBUG/dalvikvm(1806): VFY: replacing opcode 0x62 at 0x000e
01-09 22:17:05.609: DEBUG/AndroidRuntime(1806): Shutting down VM
01-09 22:17:05.609: WARN/dalvikvm(1806): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
01-09 22:17:05.629: ERROR/AndroidRuntime(1806): FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
at android.app.Activity.onCreateView(Activity.java:4242)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:673)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
at android.app.Activity.setContentView(Activity.java:1835)
at com.example.MapTest.MyActivity.onCreate(MyActivity.java:13)
at android.app.Activity.performCreate(Activity.java:4465)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
at android.app.ActivityThread.access$600(ActivityThread.java:123)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
01-09 22:17:05.649: WARN/ActivityManager(1031): Force finishing activity com.example.MapTest/.MyActivity
01-09 22:17:05.659: WARN/WindowManager(1031): Failure taking screenshot for (180x300) to layer 21010
01-09 22:17:05.680: INFO/Process(1031): Sending signal. PID: 1806 SIG: 3
01-09 22:17:05.680: INFO/dalvikvm(1806): threadid=3: reacting to signal 3
01-09 22:17:05.699: INFO/dalvikvm(1806): Wrote stack traces to '/data/anr/traces.txt'
01-09 22:17:06.169: WARN/ActivityManager(1031): Activity pause timeout for ActivityRecord{4146dc60 com.example.MapTest/.MyActivity}
01-09 22:17:06.209: INFO/Process(1031): Sending signal. PID: 1806 SIG: 3
01-09 22:17:06.209: INFO/dalvikvm(1806): threadid=3: reacting to signal 3
01-09 22:17:06.229: INFO/dalvikvm(1806): Wrote stack traces to '/data/anr/traces.txt'
01-09 22:17:06.589: WARN/NetworkManagementSocketTagger(1031): setKernelCountSet(10044, 0) failed with errno -2
01-09 22:17:07.899: INFO/Process(1806): Sending signal. PID: 1806 SIG: 9
01-09 22:17:07.919: INFO/ActivityManager(1031): Process com.example.MapTest (pid 1806) has died.
01-09 22:17:08.109: WARN/InputManagerService(1031): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#414b9608
At the moment it is not possible to run Google Android Maps v2 on emulator (see response from Android devs here). You should use real device instead.
However, you can look for updates in this thread - looks like someone managed to create emulator which supports Google Android Maps v2
EDIT:
I can see some problem in your code:
You should extend android.support.v4.app.FragmentActivity, but not regular Activity class.
Also make sure you have added GooglePlayServices project (actually imported entire project) but not just a jar file. If you are using Eclipse, import the library project into your workspace. Click File > Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.
I finally fixed the problem. Google has a very bad tutorial. First of all thank you Pavel Dudka for the big help.
i imported google play lib as module and then google play lib as jar then i also added onother jar file android.suport.v4.jar were is can be found as the name is exmaple android\suppor\v4
After those modifications and with the recomentations the map did not work so i added the modified fragment bellow instead of using the one google provited and the map worked like a charm.
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="wrap_content"
android:layout_height="match_parent" />

Categories