I can’t fetch the contents of the Big Nerd Ranch home page like in Figure 25.5. I debugged the code using breakpoints and it seems the AsyncTask execute() method is called but not doInBackground(). In the logcat I can’t find anything that should have something to do with the AsyncTask.
I have also tried the executeOnExecuter() method.
Am I missing something??
2019-12-20 13:14:24.720 31063-31063/? I/art: Not late-enabling -Xcheck:jni (already on)2019-12-20 13:14:24.721 31063-31063/? W/art: Unexpected CPU variant for X86 using defaults: x86
2019-12-20 13:14:25.048 31063-31063/? W/ActivityThread: Application com.example.photogallery is waiting for the debugger on port 8100...
2019-12-20 13:14:25.192 31063-31063/? I/System.out: Sending WAIT chunk
2019-12-20 13:14:25.369 31063-31070/? I/art: Debugger is no longer active
2019-12-20 13:14:25.369 31063-31070/? I/art: Starting a blocking GC Instrumentation
2019-12-20 13:14:26.570 31063-31070/com.example.photogallery I/art: Debugger is active
2019-12-20 13:14:26.658 31063-31063/com.example.photogallery I/System.out: Debugger has connected
2019-12-20 13:14:26.658 31063-31063/com.example.photogallery I/System.out: waiting for debugger to settle...
2019-12-20 13:14:26.860 31063-31063/com.example.photogallery I/System.out: waiting for debugger to settle...
2019-12-20 13:14:27.062 31063-31063/com.example.photogallery I/System.out: waiting for debugger to settle...
2019-12-20 13:14:27.262 31063-31063/com.example.photogallery I/System.out: waiting for debugger to settle...
2019-12-20 13:14:27.464 31063-31063/com.example.photogallery I/System.out: waiting for debugger to settle...
2019-12-20 13:14:27.666 31063-31063/com.example.photogallery I/System.out: waiting for debugger to settle...
2019-12-20 13:14:27.868 31063-31063/com.example.photogallery I/System.out: waiting for debugger to settle...
2019-12-20 13:14:28.070 31063-31063/com.example.photogallery I/System.out: debugger has settled (1347)
2019-12-20 13:14:28.072 31063-31063/com.example.photogallery W/System: ClassLoader referenced unknown path: /data/app/com.example.photogallery-1/lib/x86
2019-12-20 13:14:28.125 31063-31063/com.example.photogallery W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
2019-12-20 13:14:28.200 31063-31063/com.example.photogallery I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener;
2019-12-20 13:14:28.200 31063-31063/com.example.photogallery I/art: at void androidx.core.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2559)
2019-12-20 13:14:28.200 31063-31063/com.example.photogallery I/art: at void androidx.appcompat.widget.ActionBarContainer.<init>(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:62)
2019-12-20 13:14:28.200 31063-31063/com.example.photogallery I/art: at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2)
2019-12-20 13:14:28.200 31063-31063/com.example.photogallery I/art: at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430)
2019-12-20 13:14:28.200 31063-31063/com.example.photogallery I/art: at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:645)
2019-12-20 13:14:28.200 31063-31063/com.example.photogallery I/art: at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:787)
2019-12-20 13:14:28.200 31063-31063/com.example.photogallery I/art: at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:727)
2019-12-20 13:14:28.200 31063-31063/com.example.photogallery I/art: at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:858)
2019-12-20 13:14:28.200 31063-31063/com.example.photogallery I/art: at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:821)
2019-12-20 13:14:28.201 31063-31063/com.example.photogallery I/art: at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518)
2019-12-20 13:14:28.201 31063-31063/com.example.photogallery I/art: at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426)
2019-12-20 13:14:28.201 31063-31063/com.example.photogallery I/art: at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377)
2019-12-20 13:14:28.201 31063-31063/com.example.photogallery I/art: at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:607)
2019-12-20 13:14:28.201 31063-31063/com.example.photogallery I/art: at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518)
2019-12-20 13:14:28.201 31063-31063/com.example.photogallery I/art: at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466)
2019-12-20 13:14:28.201 31063-31063/com.example.photogallery I/art: at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: at void com.example.photogallery.SingleFragmentActivity.onCreate(android.os.Bundle) (SingleFragmentActivity.java:14)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6662)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1118)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2599)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2707)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1460)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: at void android.os.Looper.loop() (Looper.java:154)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6077)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:866)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:756)
2019-12-20 13:14:28.202 31063-31063/com.example.photogallery I/art: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.View$OnUnhandledKeyEventListener" on path: DexPathList[[zip file "/data/app/com.example.photogallery-1/base.apk"],nativeLibraryDirectories=[/data/app/com.example.photogallery-1/lib/x86, /system/lib, /vendor/lib]]
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void androidx.core.view.ViewCompat.setBackground(android.view.View, android.graphics.drawable.Drawable) (ViewCompat.java:2559)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void androidx.appcompat.widget.ActionBarContainer.<init>(android.content.Context, android.util.AttributeSet) (ActionBarContainer.java:62)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:645)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:787)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:727)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:858)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:821)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:518)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:426)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:377)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at android.view.ViewGroup androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor() (AppCompatDelegateImpl.java:607)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor() (AppCompatDelegateImpl.java:518)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void androidx.appcompat.app.AppCompatDelegateImpl.setContentView(int) (AppCompatDelegateImpl.java:466)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void androidx.appcompat.app.AppCompatActivity.setContentView(int) (AppCompatActivity.java:140)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void com.example.photogallery.SingleFragmentActivity.onCreate(android.os.Bundle) (SingleFragmentActivity.java:14)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6662)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1118)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2599)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2707)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void android.app.ActivityThread.-wrap12(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1460)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void android.os.Looper.loop() (Looper.java:154)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6077)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:866)
2019-12-20 13:14:28.203 31063-31063/com.example.photogallery I/art: at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:756)
2019-12-20 13:14:28.346 31063-31070/com.example.photogallery I/art: Starting a blocking GC Instrumentation
2019-12-20 13:14:28.421 31063-31094/com.example.photogallery I/OpenGLRenderer: Initialized EGL, version 1.4
2019-12-20 13:14:28.421 31063-31094/com.example.photogallery D/OpenGLRenderer: Swap behavior 1
2019-12-20 13:14:28.421 31063-31094/com.example.photogallery W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2019-12-20 13:14:28.422 31063-31094/com.example.photogallery D/OpenGLRenderer: Swap behavior 0
2019-12-20 13:14:28.444 31063-31094/com.example.photogallery D/EGL_emulation: eglCreateContext: 0xad9850c0: maj 2 min 0 rcv 2
2019-12-20 13:14:28.475 31063-31094/com.example.photogallery D/EGL_emulation: eglMakeCurrent: 0xad9850c0: ver 2 0 (tinfo 0xad9831e0)
2019-12-20 13:14:28.518 31063-31094/com.example.photogallery D/EGL_emulation: eglMakeCurrent: 0xad9850c0: ver 2 0 (tinfo 0xad9831e0)