I have a problem with my admob implementation and is hoping you guys might be able to help me out.
I can't seem to be able to locate the problem in the log and I am pretty lost. My question is - what have I done wrong since the ad won't load. The app is loading fine but the ad doesn't show - why?. Here is my logcat:
10-31 22:05:31.191: D/AbsListView(11349): Get MotionRecognitionManager
10-31 22:05:31.382: D/dalvikvm(11349): DexOpt: --- BEGIN 'ads-16831983.jar' (bootstrap=0) ---
10-31 22:05:31.432: I/Ads(11349): Starting ad request.
10-31 22:05:31.552: D/libEGL(11349): loaded /system/lib/egl/libEGL_adreno200.so
10-31 22:05:31.552: D/libEGL(11349): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
10-31 22:05:31.562: D/libEGL(11349): loaded /system/lib/egl/libGLESv2_adreno200.so
10-31 22:05:31.562: I/Adreno200-EGL(11349): <qeglDrvAPI_eglInitialize:265>: EGL 1.4 QUALCOMM build: AYELDER_AU_LINUX_ANDROID_JB_2.5.5.04.02.02.092.023+PATCH[ES]_msm8960_JB_2.5.5_CL3556704_release_ENGG (CL3556704)
10-31 22:05:31.562: I/Adreno200-EGL(11349): Build Date: 05/17/13 Fri
10-31 22:05:31.562: I/Adreno200-EGL(11349): Local Branch:
10-31 22:05:31.562: I/Adreno200-EGL(11349): Remote Branch: quic/jb_2.5.5
10-31 22:05:31.562: I/Adreno200-EGL(11349): Local Patches: 34c9e193f12610d3e68dabd6198d2c4bfbc66974 RB: Update the master timestamp of the hw_image in rb_texture_update_aliased
10-31 22:05:31.562: I/Adreno200-EGL(11349): Reconstruct Branch: AU_LINUX_ANDROID_JB_2.5.5.04.02.02.092.023 + 01d3c78 + e6f0547 + LOCAL_PATCH[ES]
10-31 22:05:31.602: D/OpenGLRenderer(11349): Enabling debug mode 0
10-31 22:05:31.742: D/dalvikvm(11349): DexOpt: --- END 'ads-16831983.jar' (success) ---
10-31 22:05:31.742: D/dalvikvm(11349): DEX prep '/data/data/com.example.going_android/cache/ads-16831983.jar': unzip in 0ms, rewrite 362ms
10-31 22:05:32.313: W/Ads(11349): There was a problem getting an ad response. ErrorCode: 1
10-31 22:05:32.323: I/dalvikvm(11349): Could not find method android.webkit.WebView.evaluateJavascript, referenced from method com.google.android.gms.ads.internal.o.a.evaluateJavascript
10-31 22:05:32.323: W/dalvikvm(11349): VFY: unable to resolve virtual method 3227: Landroid/webkit/WebView;.evaluateJavascript (Ljava/lang/String;Landroid/webkit/ValueCallback;)V
10-31 22:05:32.323: D/dalvikvm(11349): VFY: replacing opcode 0x6f at 0x0016
10-31 22:05:32.363: I/webclipboard(11349): clipservice: android.sec.clipboard.ClipboardExManager#418e1fb0
10-31 22:05:32.393: W/Ads(11349): Failed to load ad: 1
10-31 22:05:32.403: D/WebView(11349): onSizeChanged - w:480 h:75
10-31 22:05:32.443: V/webkit(11349): BrowserFrame constructor: this=Handler (android.webkit.BrowserFrame) {418da9a8}
Here is the relevant code from the xml:
<com.google.android.gms.ads.AdView android:id="#+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="MY UNIT ID HERE (hidden)"/>
And the relevant code from my .java file:
AdView adView = (AdView)rootView.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice("MY DEVICE ID HERE (hidden)").build();
adView.loadAd(adRequest);
I hope you guys can help me out here!
Your code looks fine. But I wonder what version of Android (or device) you deployed to to get the log above.
10-31 22:05:32.313: W/Ads(11349): There was a problem getting an ad response. ErrorCode: 1
10-31 22:05:32.323: I/dalvikvm(11349): Could not find method android.webkit.WebView.evaluateJavascript, referenced from method com.google.android.gms.ads.internal.o.a.evaluateJavascript
10-31 22:05:32.323: W/dalvikvm(11349): VFY: unable to resolve virtual method 3227: Landroid/webkit/WebView;.evaluateJavascript (Ljava/lang/String;Landroid/webkit/ValueCallback;)V
These log lines seem to indicate that Admob was looking for a WebKit method that doesn't exist in your Android environment.
The Google Play versions of Admob (which you seem to be using) only support Gingerbread and up.
Related
I have problem with my first application in Android Studio-Cordova.
I used for my application html,css, jquery and sql.
The application is correct, because I'm attending an on-line course with related code.
It starts, but the message of creating db isn't appeared.
the log of Android Studio is this:
Client not ready yet..Waiting for process to come online
Connected to process 2679 on device Nexus_5_API_19_armeabi_v7a [emulator-5554]
I/InstantRun: Instant Run Runtime started. Android package is com.videocorsi.test, real application class is null.
W/InstantRun: No instant run dex files added to classpath
I/CordovaLog: Changing log level to DEBUG(3)
I/CordovaActivity: Apache Cordova native platform version 6.0.0 is starting
D/CordovaActivity: CordovaActivity.onCreate()
I/dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method org.apache.cordova.CordovaInterfaceImpl.hasPermission
W/dalvikvm: VFY: unable to resolve virtual method 2: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0023
I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method org.apache.cordova.CordovaInterfaceImpl.requestPermissions
W/dalvikvm: VFY: unable to resolve virtual method 136: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0029
V/WebViewChromium: Binding Chromium to the background looper Looper (main, tid 1) {9dd95220}
I/chromium: [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0
I/BrowserProcessMain: Initializing chromium process, renderers=0
W/chromium: [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation
D/dalvikvm: GC_FOR_ALLOC freed 142K, 12% free 3463K/3892K, paused 86ms, total 88ms
I/dalvikvm-heap: Grow heap (frag case) to 6.078MB for 2536936-byte allocation
D/dalvikvm: GC_FOR_ALLOC freed 0K, 7% free 5941K/6372K, paused 58ms, total 58ms
I/dalvikvm: Could not find method android.webkit.CookieManager.setAcceptThirdPartyCookies, referenced from method org.apache.cordova.engine.SystemCookieManager.<init>
W/dalvikvm: VFY: unable to resolve virtual method 953: Landroid/webkit/CookieManager;.setAcceptThirdPartyCookies (Landroid/webkit/WebView;Z)V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0046
I/dalvikvm: Could not find method android.webkit.CookieManager.flush, referenced from method org.apache.cordova.engine.SystemCookieManager.flush
W/dalvikvm: VFY: unable to resolve virtual method 947: Landroid/webkit/CookieManager;.flush ()V
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0019
W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;)
W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;)
I/dalvikvm: Could not find method android.webkit.WebViewClient.onReceivedClientCertRequest, referenced from method org.apache.cordova.engine.SystemWebViewClient.onReceivedClientCertRequest
W/dalvikvm: VFY: unable to resolve virtual method 1147: Landroid/webkit/WebViewClient;.onReceivedClientCertRequest (Landroid/webkit/WebView;Landroid/webkit/ClientCertRequest;)V
D/dalvikvm: VFY: replacing opcode 0x6f at 0x0031
W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/PermissionRequest;)
I/dalvikvm: Could not find method android.webkit.PermissionRequest.getResources, referenced from method org.apache.cordova.engine.SystemWebChromeClient.onPermissionRequest
W/dalvikvm: VFY: unable to resolve virtual method 964: Landroid/webkit/PermissionRequest;.getResources ()[Ljava/lang/String;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0023
I/dalvikvm: Could not find method android.webkit.WebChromeClient$FileChooserParams.createIntent, referenced from method org.apache.cordova.engine.SystemWebChromeClient.onShowFileChooser
W/dalvikvm: VFY: unable to resolve virtual method 969: Landroid/webkit/WebChromeClient$FileChooserParams;.createIntent ()Landroid/content/Intent;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0021
D/SystemWebViewEngine: CordovaWebView is running on device made by: unknown
D/PluginManager: init()
D/CordovaWebViewImpl: >>> loadUrl(file:///android_asset/www/index.html)
D/CordovaActivity: Started the activity.
D/CordovaActivity: Resumed the activity.
D/OpenGLRenderer: Enabling debug mode 0
I/Choreographer: Skipped 81 frames! The application may be doing too much work on its main thread.
W/AwContents: nativeOnDraw failed; clearing to background color.
W/AwContents: nativeOnDraw failed; clearing to background color.
W/AwContents: nativeOnDraw failed; clearing to background color.
W/AwContents: nativeOnDraw failed; clearing to background color.
D/CordovaWebViewImpl: onPageDidNavigate(file:///android_asset/www/index.html)
D/JsMessageQueue: Set native->JS mode to EvalBridgeMode
I/chromium: [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
I/chromium: [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
I/Choreographer: Skipped 74 frames! The application may be doing too much work on its main thread.
D/SystemWebChromeClient: file:///android_asset/www/cordova_plugins.js: Line 7 : Uncaught SyntaxError: Unexpected string
I/chromium: [INFO:CONSOLE(7)] "Uncaught SyntaxError: Unexpected string", source: file:///android_asset/www/cordova_plugins.js (7)
D/CordovaWebViewImpl: onPageFinished(file:///android_asset/www/index.html)
D/SystemWebChromeClient: file:///android_asset/www/js/index.js: Line 39 : Uncaught ReferenceError: listeningElement is not defined
I/chromium: [INFO:CONSOLE(39)] "Uncaught ReferenceError: listeningElement is not defined", source: file:///android_asset/www/js/index.js (39)
D/SystemWebChromeClient: file:///android_asset/www/index.html: Line 237 : Uncaught TypeError: Cannot call method 'transaction' of undefined
I/chromium: [INFO:CONSOLE(237)] "Uncaught TypeError: Cannot call method 'transaction' of undefined", source: file:///android_asset/www/index.html (237)
What Can I do?
the problem was in this file index.js . I had commented this:
receivedEvent: function(id) { var parentElement =document.getElementById(id);
// var listeningElement = parentElement.querySelector('.listening');
//var receivedElement = parentElement.querySelector('.received');
// listeningElement.setAttribute('style', 'display:none;'); //receivedElement.setAttribute('style', 'display:block;');
console.log('Received Event: ' + id); }
Then, I had move the tag script with my js/jquery code at the end of the tag
I'm looking for a good option to automate my tests in a mobile application. Genymotion looks the best option.
So i installed genymotion, added the arm translation and gapps in the vm, but when i try to open my application i get: "Unfortunately, [app name] has stopped."
Applications such clash of clans and facebook does works, and applications such Uber and Netflix doesnt either. This issue happens in an kit kat emulator. Jelly Bean and ICS looks fine.
Here's what logcat says:
01-07 16:31:04.204 2979-2979/com.psafe.powerpro I/MultiDex﹕ VM with version 1.6.0 does not have multidex support
01-07 16:31:04.204 2979-2979/com.psafe.powerpro I/MultiDex﹕ install
01-07 16:31:04.212 2979-2979/com.psafe.powerpro I/MultiDex﹕ MultiDexExtractor.load(/data/app/com.psafe.powerpro-1.apk, false)
01-07 16:31:04.212 2979-2979/com.psafe.powerpro I/MultiDex﹕ loading existing secondary dex files
01-07 16:31:04.212 2979-2979/com.psafe.powerpro I/MultiDex﹕ load found 0 secondary dex files
01-07 16:31:04.212 2979-2979/com.psafe.powerpro I/MultiDex﹕ install done
01-07 16:31:04.232 2979-2979/com.psafe.powerpro I/dalvikvm﹕ Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method gQ.a
01-07 16:31:04.232 2979-2979/com.psafe.powerpro W/dalvikvm﹕ VFY: unable to resolve virtual method 6352: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
01-07 16:31:04.232 2979-2979/com.psafe.powerpro D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x000e
01-07 16:31:04.256 2979-2995/com.psafe.powerpro I/GMPM﹕ App measurement is starting up
01-07 16:31:04.264 2979-2979/com.psafe.powerpro D/dalvikvm﹕ GC_FOR_ALLOC freed 354K, 14% free 3003K/3464K, paused 4ms, total 5ms
01-07 16:31:04.264 2979-2995/com.psafe.powerpro E/GMPM﹕ getGoogleAppId failed with status: 10
01-07 16:31:04.268 2979-2995/com.psafe.powerpro E/GMPM﹕ Uploading is not possible. App measurement disabled
01-07 16:31:04.280 2979-2979/com.psafe.powerpro D/dalvikvm﹕ Trying to load lib /data/data/com.psafe.powerpro/files/libmobilesafe360-jni-2.7.so 0xa50565b0
01-07 16:31:04.308 2979-2979/com.psafe.powerpro A/libc﹕ Fatal signal 11 (SIGSEGV) at 0x000000b4 (code=1), thread 2979 (.psafe.powerpro)
Any toughts about it?
I'm new to android and am making an app which features many activities and a user prefs get edited during almost every one, and it seems that it randomly starts crashing 6 or 7 activities in, and opening up a different activity from a couple of pages ago, but only sometimes. I do everything exactly the same each time and I don't know what causes it to crash. Usually it will crash back to a different intent and let me continue from there. Here is the logcat after a crash:
10-31 13:01:52.122 2542-2542/? I/art: Not late-enabling -Xcheck:jni (already on)
10-31 13:01:52.253 2542-2542/? I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.hardware.fingerprint.FingerprintManagerCompatApi23$1>
10-31 13:01:52.253 2542-2542/? I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.hardware.fingerprint.FingerprintManagerCompatApi23$1>
10-31 13:01:52.360 2542-2542/? W/art: Before Android 4.1, method int android.support.v7.internal.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
10-31 13:01:52.516 2542-2558/? D/OpenGLRenderer: Render dirty regions requested: true
10-31 13:01:52.517 2542-2542/? D/: HostConnection::get() New Host Connection established 0xa66e01b0, tid 2542
10-31 13:01:52.522 2542-2542/? D/Atlas: Validating map...
10-31 13:01:52.569 2542-2558/? D/: HostConnection::get() New Host Connection established 0xa66e0260, tid 2558
10-31 13:01:52.578 2542-2558/? I/OpenGLRenderer: Initialized EGL, version 1.4
10-31 13:01:52.592 2542-2558/? D/OpenGLRenderer: Enabling debug mode 0
10-31 13:01:52.602 2542-2558/? W/EGL_emulation: eglSurfaceAttrib not implemented
10-31 13:01:52.602 2542-2558/? W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xa66b4b20, error=EGL_SUCCESS
I'm facing this really strange issue and I couldn't realize what's happening.
I have a login activity and when I try to make a request to validate the user information, I get this error in volley:
com.android.volley.NoConnectionError: java.net.UnknownHostException: Unable to resolve host "teste.escolaemmovimento.com.br": No address associated with hostname.
This error only happens when I'm using the Genymotion emulator, I verify the URL field inside of the volley Request object right after create that and after insert the request in the volley queue and the correct url is there.
(when I test in the device this error does not happens.)
LogCat:
06-01 13:17:28.351 25469-25521/br.com.escolaemmovimento D/OpenGLRenderer﹕ Render dirty regions requested: true
06-01 13:17:28.362 25469-25469/br.com.escolaemmovimento D/﹕ HostConnection::get() New Host Connection established 0xabb84990, tid 25469
06-01 13:17:28.374 25469-25469/br.com.escolaemmovimento D/Atlas﹕ Validating map...
06-01 13:17:28.556 25469-25521/br.com.escolaemmovimento D/libEGL﹕ loaded /system/lib/egl/libEGL_emulation.so
06-01 13:17:28.557 25469-25521/br.com.escolaemmovimento D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_emulation.so
06-01 13:17:28.568 25469-25521/br.com.escolaemmovimento D/libEGL﹕ loaded /system/lib/egl/libGLESv2_emulation.so
06-01 13:17:28.578 25469-25521/br.com.escolaemmovimento D/﹕ HostConnection::get() New Host Connection established 0xaf60b940, tid 25521
06-01 13:17:28.604 25469-25521/br.com.escolaemmovimento I/OpenGLRenderer﹕ Initialized EGL, version 1.4
06-01 13:17:28.635 25469-25521/br.com.escolaemmovimento D/OpenGLRenderer﹕ Enabling debug mode 0
06-01 13:17:28.650 25469-25521/br.com.escolaemmovimento W/EGL_emulation﹕ eglSurfaceAttrib not implemented
06-01 13:17:28.651 25469-25521/br.com.escolaemmovimento W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xaf639400, error=EGL_SUCCESS
06-01 13:17:54.808 25469-25469/br.com.escolaemmovimento I/System.out﹕ com.android.volley.NoConnectionError: java.net.UnknownHostException: Unable to resolve host "teste.escolaemmovimento.com.br": No address associated with hostname
Anyone has already faced this issue? This is a problem only associate with the emulator? Thanks for any help.
UnknownHostException is thrown to indicate that the IP address of a host could not be determined. Make sure you have internet access inside of Genymotion.
I'm trying to write my first android application. I've this problem
When i try to show this activity
setContentView(R.layout.activity_poi_map);
This is the file xml of the activity
<?xml version="1.0" encoding="utf-8"?>
<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.SupportMapFragment"/>
The application show a black background empty and black and the log file is this:
02-20 21:33:45.113: D/libEGL(19145): loaded /system/lib/egl/libEGL_mali.so
02-20 21:33:45.113: D/libEGL(19145): loaded /system/lib/egl/libGLESv1_CM_mali.so
02-20 21:33:45.123: D/libEGL(19145): loaded /system/lib/egl/libGLESv2_mali.so
02-20 21:33:45.153: D/OpenGLRenderer(19145): Enabling debug mode 0
02-20 21:33:45.223: E/SensorManager(19145): thread start
02-20 21:33:45.233: D/SensorManager(19145): registerListener :: handle = 0 name= MPU- 6050 Accelerometer delay= 200000 Listener= android.view.OrientationEventListener$SensorEventListenerImpl#419da6c0
02-20 21:33:59.237: W/dalvikvm(19145): VFY: unable to resolve static field 849 (MapAttrs) in Lcom/google/android/gms/R$styleable;
02-20 21:33:59.237: D/dalvikvm(19145): VFY: replacing opcode 0x62 at 0x000e
This activity only have to show the map, why don't works?
Thanks in advance for your answer.
unable to resolve static field
That sort of error probably means that you are trying to run mismatched versions of your code together. Clean your build and rebuild everything, and try again.