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>
Related
I'm having trouble using these codes on Android 9 (work fine in lower versions)
Exits immediately and below error
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
Process: com.banehmall.application, PID: 2092
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:354)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/bind/DatatypeConverter;
at org.scribe.services.DatatypeConverterEncoder.encode(DatatypeConverterEncoder.java:10)
at org.scribe.services.HMACSha1SignatureService.bytesToBase64String(HMACSha1SignatureService.java:51)
at org.scribe.services.HMACSha1SignatureService.doSign(HMACSha1SignatureService.java:46)
at org.scribe.services.HMACSha1SignatureService.getSignature(HMACSha1SignatureService.java:32)
at org.scribe.oauth.OAuth10aServiceImpl.getSignature(OAuth10aServiceImpl.java:151)
at org.scribe.oauth.OAuth10aServiceImpl.addOAuthParams(OAuth10aServiceImpl.java:75)
at org.scribe.oauth.OAuth10aServiceImpl.signRequest(OAuth10aServiceImpl.java:126)
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:109)
at com.ciyashop.library.apicall.PostApi$postAPiCall.doInBackground(PostApi.java:40)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.xml.bind.DatatypeConverter" on path: DexPathList[[zip file "/data/app/com.banehmall.application-5XvyXjUfi1L5D2K7385M5A==/base.apk", zip file "/data/app/com.banehmall.application-5XvyXjUfi1L5D2K7385M5A==/split_lib_dependencies_apk.apk", zip file "/data/app/com.banehmall.application-5XvyXjUfi1L5D2K7385M5A==/split_lib_resources_apk.apk", zip file "/data/app/com.banehmall.application-5XvyXjUfi1L5D2K7385M5A==/split_lib_slice_0_apk.apk", zip file "/data/app/com.banehmall.application-5XvyXjUfi1L5D2K7385M5A==/split_lib_slice_1_apk.apk", zip file "/data/app/com.banehmall.application-5XvyXjUfi1L5D2K7385M5A==/split_lib_slice_2_apk.apk", zip file "/data/app/com.banehmall.application-5XvyXjUfi1L5D2K7385M5A==/split_lib_slice_3_apk.apk", zip file "/data/app/com.banehmall.application-5XvyXjUfi1L5D2K7385M5A==/split_lib_slice_4_apk.apk", zip file "/data/app/com.banehmall.application-5XvyXjUfi1L5D2K7385M5A==/split_lib_slice_5_apk.apk", zip file "/data/app/com.banehmall.application-5XvyXjUfi1L5D2K7385M5A==/split_lib_slice_6_apk.apk", zip file "/data/app/com.banehmall.application-5XvyXjUfi1L5D2K7385M5A==/split_lib_slice_7_apk.apk", zip file "/data/app/com.banehmall.application-5XvyXjUfi1L5D2K7385M5A==/split_lib_slice_8_apk.apk", zip file "/data/app/com.banehmall.application-.
.
.
After adding this (commons-codec:commons-codec:1.10)library, app worked but the data is not received from the server and have
this log
E/Exception is: There was a problem while creating a connection to the remote service.
E/EGL_emulation: tid 2357: eglSurfaceAttrib(1354): error 0x3009 (EGL_BAD_MATCH)
W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xeb2e4dc0, error=EGL_BAD_MATCH
E/EGL_emulation: tid 2357: eglSurfaceAttrib(1354): error 0x3009 (EGL_BAD_MATCH)
W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xeb2e4e20, error=EGL_BAD_MATCH
E/getHomeDataResponse is: OAuthConnectionException
E/getHomeDataGson Exception is: Value OAuthConnectionException of type java.lang.String cannot be
converted to JSONObject
I/OpenGLRenderer: Davey! duration=899ms; Flags=0, IntendedVsync=1587234779362, Vsync=1587568112682,
OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=1587582802287,
AnimationStart=1587582869695, PerformTraversalsStart=1587582992031, DrawStart=1587644518429,
SyncQueued=1587720147467, SyncStart=1587740410691, IssueDrawCommandsStart=1587740635430,
SwapBuffers=1588088691627, FrameCompleted=1588154607644, DequeueBufferDuration=199000,
QueueBufferDuration=417000,
thank you so mach
Hi i found the solution to this problem. In Android 9(28 and up)uses HTTPS ,if your server uses HTTP this error is happen. answer is writing the following code in the manifest
<application
.
.
.
android:usesCleartextTraffic="true">
<uses-library android:name="org.apache.http.legacy" android:required="false" />
if not work use Invalidate Caches / Restart
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.
I've spent the last two hours trying to figure out how to do this, and am coming up blank. I've looked through many of the entries here on stackoverflow related to this...although I've tried to follow the fixes as written nothing has helped. I think if I had a better understanding of how Java, Android, and Eclipse worked I could use the previous answers, but I'm going to need a more basic explanation. Here's what I'm trying to do: I've created an Android Library Project called AndroidUILibrary. I can't post the image of what my Java Build Path window looks like (need 10 reputation points), but I am exporting both the src and gen folders from my project.
In this library project I have the following class:
public class FileDialogFragment extends DialogFragment {
#Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
activity = getActivity();
activity.setContentView(R.id.fileDialogFragmentLinearLayout);
and the library's manifest looks like this:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sailbravado.androiduilibrary"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="19" />
<library />
<application
android:allowBackup="false"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
</application>
</manifest>
In my Android Application I have the following code:
final FileDialogFragment fileDialog = new FileDialogFragment();
fileDialog.setCanSelectFiles(false);
fileDialog.setOnClickListener(new DialogInterface.OnClickListener() {
#Override
public void onClick(DialogInterface dialog, int which) {
if (which == DialogInterface.BUTTON_POSITIVE) {
logFolderValueTextView.setText(fileDialog.getSelectedFiles().get(0).getAbsolutePath());
logFolderValueTextView.setTag(true);
}
}
});
fileDialog.show(activity.getFragmentManager(), "");
In my Android application's Java Build Path I added AndroidUILibrary to the Projects tab, androiduilibrary.jar to the Libraries tab, and ensured that all entries are checked in Order and Export. I then attempt to run the application. The Console shows the following output:
[2014-09-20 18:45:03 - GPSLogger] Dx
trouble writing output: already prepared
[2014-09-20 18:45:04 - GPSLogger] ------------------------------
[2014-09-20 18:45:04 - GPSLogger] Android Launch!
[2014-09-20 18:45:04 - GPSLogger] adb is running normally.
[2014-09-20 18:45:04 - GPSLogger] Performing com.sailbravado.gpslogger.GPSLoggerActivity activity launch
[2014-09-20 18:45:04 - GPSLogger] Automatic Target Mode: using device 'E5ATCT027686'
[2014-09-20 18:45:04 - GPSLogger] Uploading GPSLogger.apk onto device 'E5ATCT027686'
[2014-09-20 18:45:04 - GPSLogger] Installing GPSLogger.apk...
[2014-09-20 18:45:07 - GPSLogger] Success!
[2014-09-20 18:45:07 - AndroidUILibrary] Could not find AndroidUILibrary.apk!
[2014-09-20 18:45:07 - GPSLogger] Starting activity com.sailbravado.gpslogger.GPSLoggerActivity on device E5ATCT027686
[2014-09-20 18:45:08 - GPSLogger] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.sailbravado.gpslogger/.GPSLoggerActivity }
When the "Dx" entry in the Console shows up, I notice a new folder gets created in my project hierarchy: bin/dexedLibs. It contains two JAR files...my androiduilibrary and appcompat_v7, both followed by a 32-digit hex number. The application launches fine, but when I invoke the part that should create the dialog, I get:
09-20 18:53:58.355: E/AndroidRuntime(2739): FATAL EXCEPTION: main
09-20 18:53:58.355: E/AndroidRuntime(2739): Process: com.sailbravado.gpslogger, PID: 2739
09-20 18:53:58.355: E/AndroidRuntime(2739): java.lang.NoClassDefFoundError: com.sailbravado.androiduilibrary.R$id
09-20 18:53:58.355: E/AndroidRuntime(2739): at com.sailbravado.androiduilibrary.FileDialogFragment.onCreateDialog(FileDialogFragment.java:251)
09-20 18:53:58.355: E/AndroidRuntime(2739): at android.app.DialogFragment.getLayoutInflater(DialogFragment.java:398)
09-20 18:53:58.355: E/AndroidRuntime(2739): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:890)
09-20 18:53:58.355: E/AndroidRuntime(2739): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
09-20 18:53:58.355: E/AndroidRuntime(2739): at android.app.BackStackRecord.run(BackStackRecord.java:685)
09-20 18:53:58.355: E/AndroidRuntime(2739): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
09-20 18:53:58.355: E/AndroidRuntime(2739): at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
09-20 18:53:58.355: E/AndroidRuntime(2739): at android.os.Handler.handleCallback(Handler.java:733)
09-20 18:53:58.355: E/AndroidRuntime(2739): at android.os.Handler.dispatchMessage(Handler.java:95)
09-20 18:53:58.355: E/AndroidRuntime(2739): at android.os.Looper.loop(Looper.java:136)
09-20 18:53:58.355: E/AndroidRuntime(2739): at android.app.ActivityThread.main(ActivityThread.java:5072)
09-20 18:53:58.355: E/AndroidRuntime(2739): at java.lang.reflect.Method.invokeNative(Native Method)
09-20 18:53:58.355: E/AndroidRuntime(2739): at java.lang.reflect.Method.invoke(Method.java:515)
09-20 18:53:58.355: E/AndroidRuntime(2739): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
09-20 18:53:58.355: E/AndroidRuntime(2739): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
09-20 18:53:58.355: E/AndroidRuntime(2739): at dalvik.system.NativeStart.main(Native Method)
Opening in the debugger, the exception is being thrown from the setContentView() call in the library code.
I tried adding a uses-library tag in the application's manifest, but I get:
[2014-09-20 18:02:51 - GPSLogger] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2014-09-20 18:02:51 - GPSLogger] Please check logcat output for more details.
[2014-09-20 18:02:51 - GPSLogger] Launch canceled!
Thanks in advance for any advice.
I'm working on an location-aware Android app that uses Google Maps. I upgraded by ADT to 23.0.0.1245622 the other day. I think I was on v22.6.2-1085508 before then.
Now the map view only contains the Google logo and the +/- buttons. And, eerily, my logcat contains the following line:
07-01 12:15:08.548: E/Google Maps Android API(6299): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
I have tried cleaning the project, by the way. No dice. I tried running this on an AVD instead of my Galaxy S3. No dice. I tried reverting to a previous revision of my code using git reset --hard. Still no dice. Perhaps most importantly, I tried creating a new API key in the console, and pasted that into my manifest. (Incidentally, I reverted to my older key after trying this experiment, if that is at all significant.)
I will post a full logcat below:
07-01 12:14:51.920: D/ActivityThread(6299): handleBindApplication:com.gregeveritt.hoodies
07-01 12:14:51.920: D/ActivityThread(6299): setTargetHeapUtilization:0.75
07-01 12:14:51.920: D/ActivityThread(6299): setTargetHeapMinFree:524288
07-01 12:14:52.560: I/Google Maps Android API(6299): Google Play services client version: 4132500
07-01 12:14:52.560: I/dalvikvm(6299): Could not find method guj.a, referenced from method gqi.a
07-01 12:14:52.560: W/dalvikvm(6299): VFY: unable to resolve static method 24932: Lguj;.a (Landroid/content/Context;)Lgri;
07-01 12:14:52.560: D/dalvikvm(6299): VFY: replacing opcode 0x71 at 0x0003
07-01 12:14:52.570: E/dalvikvm(6299): Could not find class 'gpr', referenced from method gps.a
07-01 12:14:52.570: W/dalvikvm(6299): VFY: unable to resolve new-instance 4089 (Lgpr;) in Lgps;
07-01 12:14:52.570: D/dalvikvm(6299): VFY: replacing opcode 0x22 at 0x0000
07-01 12:14:52.570: E/dalvikvm(6299): Could not find class 'gpr', referenced from method gps.a
07-01 12:14:52.570: W/dalvikvm(6299): VFY: unable to resolve new-instance 4089 (Lgpr;) in Lgps;
07-01 12:14:52.570: D/dalvikvm(6299): VFY: replacing opcode 0x22 at 0x0000
07-01 12:14:52.570: E/dalvikvm(6299): Could not find class 'gpr', referenced from method gps.a
07-01 12:14:52.570: W/dalvikvm(6299): VFY: unable to resolve new-instance 4089 (Lgpr;) in Lgps;
07-01 12:14:52.570: D/dalvikvm(6299): VFY: replacing opcode 0x22 at 0x0000
07-01 12:14:52.570: D/dalvikvm(6299): DexOpt: unable to opt direct call 0x5e9f at 0x0a in Lgps;.a
07-01 12:14:52.570: D/dalvikvm(6299): DexOpt: unable to opt direct call 0x5e9f at 0x0c in Lgps;.a
07-01 12:14:52.570: D/dalvikvm(6299): DexOpt: unable to opt direct call 0x5e9f at 0x0a in Lgps;.a
07-01 12:14:52.601: I/Google Maps Android API(6299): Google Play services package version: 5082036
07-01 12:14:52.611: W/dalvikvm(6299): VFY: unable to resolve static field 20868 (t) in Lyp;
07-01 12:14:52.611: D/dalvikvm(6299): VFY: replacing opcode 0x62 at 0x000e
07-01 12:14:52.611: W/dalvikvm(6299): VFY: unable to resolve static field 20868 (t) in Lyp;
07-01 12:14:52.611: D/dalvikvm(6299): VFY: replacing opcode 0x62 at 0x000d
07-01 12:14:52.931: W/ActivityThread(6299): ClassLoader.loadClass: The class loader returned by Thread.getContextClassLoader() may fail for processes that host multiple applications. You should explicitly specify a context class loader. For example: Thread.setContextClassLoader(getClass().getClassLoader());
07-01 12:14:52.971: I/dalvikvm(6299): Failed resolving Lcom/google/android/gms/location/internal/ParcelableGeofence; interface 4022 'Lgln;'
07-01 12:14:52.971: W/dalvikvm(6299): Link of class 'Lcom/google/android/gms/location/internal/ParcelableGeofence;' failed
07-01 12:14:52.971: E/dalvikvm(6299): Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method glt.a
07-01 12:14:52.971: W/dalvikvm(6299): VFY: unable to resolve check-cast 2086 (Lcom/google/android/gms/location/internal/ParcelableGeofence;) in Lglt;
07-01 12:14:52.971: D/dalvikvm(6299): VFY: replacing opcode 0x1f at 0x0019
07-01 12:14:53.111: I/Adreno200-EGL(6299): <qeglDrvAPI_eglInitialize:265>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_JB_2.5.5.04.02.02.092.059_msm8960_JB_2.5.5_CL3896081_release_AU (CL3896081)
07-01 12:14:53.111: I/Adreno200-EGL(6299): Build Date: 06/25/13 Tue
07-01 12:14:53.111: I/Adreno200-EGL(6299): Local Branch:
07-01 12:14:53.111: I/Adreno200-EGL(6299): Remote Branch: quic/jb_2.5.5
07-01 12:14:53.111: I/Adreno200-EGL(6299): Local Patches: NONE
07-01 12:14:53.111: I/Adreno200-EGL(6299): Reconstruct Branch: AU_LINUX_ANDROID_JB_2.5.5.04.02.02.092.059 + NOTHING
07-01 12:14:53.161: D/OpenGLRenderer(6299): Enabling debug mode 0
07-01 12:14:53.311: I/Google Maps Android API(6299): Failed to contact Google servers. Another attempt will be made when connectivity is established.
07-01 12:14:54.022: I/Choreographer(6299): Skipped 51 frames! The application may be doing too much work on its main thread.
07-01 12:14:54.723: I/Google Maps Android API(6299): Google Play services package version: 5082036
07-01 12:14:55.964: I/Choreographer(6299): Skipped 61 frames! The application may be doing too much work on its main thread.
07-01 12:14:56.304: I/Timeline(6299): Timeline: Activity_idle id: android.os.BinderProxy#41bc4ef8 time:302027791
07-01 12:14:56.304: I/Timeline(6299): Timeline: Activity_idle id: android.os.BinderProxy#41bc4ef8 time:302027791
07-01 12:15:08.548: E/Google Maps Android API(6299): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
07-01 12:15:58.571: W/IInputConnectionWrapper(6299): getExtractedText on inactive InputConnection
07-01 12:15:58.571: W/IInputConnectionWrapper(6299): getTextBeforeCursor on inactive InputConnection
07-01 12:15:58.581: W/IInputConnectionWrapper(6299): getSelectedText on inactive InputConnection
07-01 12:15:58.581: W/IInputConnectionWrapper(6299): getTextAfterCursor on inactive InputConnection
07-01 12:16:04.027: I/Google Maps Android API(6299): Google Play services package version: 5082036
07-01 12:16:04.167: W/IInputConnectionWrapper(6299): getExtractedText on inactive InputConnection
07-01 12:16:04.227: W/IInputConnectionWrapper(6299): getTextBeforeCursor on inactive InputConnection
07-01 12:16:05.468: W/IInputConnectionWrapper(6299): getSelectedText on inactive InputConnection
07-01 12:16:05.498: W/IInputConnectionWrapper(6299): getTextAfterCursor on inactive InputConnection
07-01 12:16:05.518: I/Timeline(6299): Timeline: Activity_idle id: android.os.BinderProxy#41bc4ef8 time:302097011
07-01 12:16:51.027: I/Timeline(6299): Timeline: Activity_idle id: android.os.BinderProxy#41bc4ef8 time:302142518
07-01 12:17:31.530: I/Google Maps Android API(6299): Google Play services package version: 5082036
07-01 12:17:32.521: I/Choreographer(6299): Skipped 49 frames! The application may be doing too much work on its main thread.
07-01 12:17:33.142: I/Timeline(6299): Timeline: Activity_idle id: android.os.BinderProxy#41bc4ef8 time:302184634
Here is my manifest, with my api key blotted out:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gregeveritt.hoodies"
android:versionCode="1"
android:versionName="0.3" >
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<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="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<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" />
<activity
android:name="com.gregeveritt.hoodies.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>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="my_api_key" />
</application>
</manifest>
Oh, and here's my map creation code, as well:
#Override
public void onConnected(Bundle dataBundle) {
Toast.makeText(this, "Connected", Toast.LENGTH_SHORT).show();
try {
showNeighborhood();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// TODO potentially switch to SupportMapFragment, lower MinSDK from 12 to 11
mMap = ( (MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
CameraUpdate startingCamera = CameraUpdateFactory.newLatLng( new LatLng(mCurrentLocation.getLatitude(), mCurrentLocation.getLongitude()) );
mMap.moveCamera(startingCamera);
// TODO What if mMap was null-checked?
}
Note: Somewhere in this process, I also switched from a 32-bit JDK to a 64-bit one. I doubt that's relevant at all, but I just like to cover my bases.
While looking over user2103379's answer and checking my API key, I found that the package name and the API key were correct. However, the SHA-1 for my new debug key was not added to the list of accepted clients. Oops! Anyway, I put the new SHA-1 in there, cleaned the Eclipse project (after disabling automatic post-clean build) and built the project anew. Worked fine.
The Issue is probably happening because the Map is not loaded and the app is trying to locate you in an unloaded Map. The Map is not loading with your api key or package name. I think your api key has got changed . Please check your api key and package name.
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