Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Android tablet (hardware) not running weather app (exactly).

Next hurdle of many...

I have been using my Android tablet connected to USB on Windows 7 for both running my apps that I've been building through the Android course as well as debugging. I followed the steps to enable the device for debugging and everything had been working quite well. I sat down to work through the next course the other night and could no longer get my device to successfully run the app.

By successfully run, I am basically trying to get an Alert Dialog to display a small error when the onFail portion of the code fails. If I run this in a virtual device, everything works great.

When I run the application and select my physical hardware device, it launches and runs the app, but never shows the dialog. If I attempt to run in debug mode with the physical device, I get an error that states it could not attach t the debugger.

I do see one of the initial logging entries that we put in via one of the steps in the course display in the output but then am not understanding what happens beyond that point.

Below is the output from Android Studio.

Any pointers here would be greatly appreciated.

10-22 21:45:39.214 30092-30092/? D/dalvikvm: Zygote::ForkAndSpecialize : 0
10-22 21:45:39.217 30092-30092/? D/dalvikvm: zygote get new systemTid : 30092
10-22 21:45:39.217 30092-30092/? D/dalvikvm: Late-enabling CheckJNI
10-22 21:45:39.218 30092-30097/? D/dalvikvm: threadid=2: interp stack at 0x5bb23000
10-22 21:45:39.218 30092-30097/? D/dalvikvm: init ref table
10-22 21:45:39.218 30092-30097/? D/dalvikvm: init mutex
10-22 21:45:39.218 30092-30098/? D/dalvikvm: threadid=3: interp stack at 0x5bc43000
10-22 21:45:39.218 30092-30098/? D/dalvikvm: init ref table
10-22 21:45:39.218 30092-30098/? D/dalvikvm: init mutex
10-22 21:45:39.220 30092-30098/? D/dalvikvm: Elevating priority from 0 to -8
10-22 21:45:39.220 30092-30092/? D/jdwp: prepping for JDWP over ADB
10-22 21:45:39.221 30092-30099/? D/dalvikvm: threadid=4: interp stack at 0x5bd64000
10-22 21:45:39.221 30092-30099/? D/dalvikvm: init ref table
10-22 21:45:39.221 30092-30099/? D/dalvikvm: init mutex
10-22 21:45:39.221 30092-30099/? D/jdwp: JDWP: thread running
10-22 21:45:39.221 30092-30100/? D/dalvikvm: threadid=5: interp stack at 0x5f2a2000
10-22 21:45:39.221 30092-30100/? D/dalvikvm: init ref table
10-22 21:45:39.221 30092-30100/? D/dalvikvm: init mutex
10-22 21:45:39.221 30092-30099/? D/jdwp: trying to receive file descriptor from ADB
10-22 21:45:39.222 30092-30092/? D/dalvikvm: zygote get thread init done
10-22 21:45:39.222 30092-30092/? D/dalvikvm: create interp thread : stack size=128KB
10-22 21:45:39.222 30092-30092/? D/dalvikvm: create new thread
10-22 21:45:39.222 30092-30092/? D/dalvikvm: new thread created
10-22 21:45:39.222 30092-30092/? D/dalvikvm: update thread list
10-22 21:45:39.222 30092-30101/? D/dalvikvm: threadid=6: interp stack at 0x5f2c2000
10-22 21:45:39.222 30092-30101/? D/dalvikvm: init ref table
10-22 21:45:39.222 30092-30101/? D/dalvikvm: init mutex
10-22 21:45:39.222 30092-30101/? D/dalvikvm: threadid=6: created from interp
10-22 21:45:39.223 30092-30092/? D/dalvikvm: start new thread
10-22 21:45:39.223 30092-30101/? D/dalvikvm: threadid=6: notify debugger
10-22 21:45:39.223 30092-30101/? D/dalvikvm: threadid=6 (ReferenceQueueDaemon): calling run()
10-22 21:45:39.223 30092-30092/? D/dalvikvm: create interp thread : stack size=128KB
10-22 21:45:39.223 30092-30092/? D/dalvikvm: create new thread
10-22 21:45:39.223 30092-30092/? D/dalvikvm: new thread created
10-22 21:45:39.223 30092-30092/? D/dalvikvm: update thread list
10-22 21:45:39.223 30092-30102/? D/dalvikvm: threadid=7: interp stack at 0x5f3e0000
10-22 21:45:39.223 30092-30102/? D/dalvikvm: init ref table
10-22 21:45:39.223 30092-30102/? D/dalvikvm: init mutex
10-22 21:45:39.223 30092-30102/? D/dalvikvm: threadid=7: created from interp
10-22 21:45:39.223 30092-30092/? D/dalvikvm: start new thread
10-22 21:45:39.223 30092-30102/? D/dalvikvm: threadid=7: notify debugger
10-22 21:45:39.223 30092-30102/? D/dalvikvm: threadid=7 (FinalizerDaemon): calling run()
10-22 21:45:39.223 30092-30092/? D/dalvikvm: create interp thread : stack size=128KB
10-22 21:45:39.223 30092-30092/? D/dalvikvm: create new thread
10-22 21:45:39.223 30092-30092/? D/dalvikvm: new thread created
10-22 21:45:39.223 30092-30092/? D/dalvikvm: update thread list
10-22 21:45:39.223 30092-30103/? D/dalvikvm: threadid=8: interp stack at 0x5f4fe000
10-22 21:45:39.223 30092-30103/? D/dalvikvm: init ref table
10-22 21:45:39.223 30092-30103/? D/dalvikvm: init mutex
10-22 21:45:39.223 30092-30103/? D/dalvikvm: threadid=8: created from interp
10-22 21:45:39.224 30092-30092/? D/dalvikvm: start new thread
10-22 21:45:39.224 30092-30103/? D/dalvikvm: threadid=8: notify debugger
10-22 21:45:39.224 30092-30103/? D/dalvikvm: threadid=8 (FinalizerWatchdogDaemon): calling run()
10-22 21:45:39.228 30092-30099/? D/jdwp: received file descriptor 38 from ADB
10-22 21:45:39.231 30092-30104/? D/dalvikvm: threadid=9: interp stack at 0x5f918000
10-22 21:45:39.231 30092-30104/? D/dalvikvm: init ref table
10-22 21:45:39.231 30092-30104/? D/dalvikvm: init mutex
10-22 21:45:39.234 30092-30105/? D/dalvikvm: threadid=10: interp stack at 0x5fa36000
10-22 21:45:39.234 30092-30105/? D/dalvikvm: init ref table
10-22 21:45:39.234 30092-30105/? D/dalvikvm: init mutex
10-22 21:45:39.267 30092-30092/? V/Provider/Settings: get setting for user 0 by user 0 so skipping cache
10-22 21:45:39.267 30092-30092/rythmair.com.stormy V/Provider/Settings: invalidate [system]: current 62 != cached 0
10-22 21:45:39.270 30092-30092/rythmair.com.stormy D/ActivityThread: hoder:android.app.IActivityManager$ContentProviderHolder@41de0a30,provider,holder.Provider:android.content.ContentProviderProxy@41de11b0
10-22 21:45:39.272 30092-30092/rythmair.com.stormy V/Provider/Settings: from db cache, name = anr_debugging_mechanism , value = 1
10-22 21:45:39.274 30092-30092/rythmair.com.stormy D/asset: AssetManager-->addDefaultAssets CIP path not exsit!
10-22 21:45:39.278 30092-30092/rythmair.com.stormy D/Proxy: setHttpRequestCheckHandler
10-22 21:45:39.279 30092-30092/rythmair.com.stormy D/dalvikvm: open_cached_dex_file : /data/app/rythmair.com.stormy-1.apk /data/dalvik-cache/data@app@rythmair.com.stormy-1.apk@classes.dex
10-22 21:45:39.281 30092-30092/rythmair.com.stormy D/ActivityThread: BIND_APPLICATION handled : 0 / AppBindData{appInfo=ApplicationInfo{41dde090 rythmair.com.stormy}}
10-22 21:45:39.289 30092-30092/rythmair.com.stormy V/ActivityThread: ActivityRecord{41ddf6a0 token=android.os.BinderProxy@41ddee78 {rythmair.com.stormy/rythmair.com.stormy.MainActivity}}: app=android.app.Application@41de4aa8, appName=rythmair.com.stormy, pkg=rythmair.com.stormy, comp={rythmair.com.stormy/rythmair.com.stormy.MainActivity}, dir=/data/app/rythmair.com.stormy-1.apk
10-22 21:45:39.294 30092-30092/rythmair.com.stormy W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
10-22 21:45:39.294 30092-30092/rythmair.com.stormy I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.internal.view.WindowCallbackWrapper.onSearchRequested
10-22 21:45:39.294 30092-30092/rythmair.com.stormy W/dalvikvm: VFY: unable to resolve interface method 15454: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
10-22 21:45:39.294 30092-30092/rythmair.com.stormy D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
10-22 21:45:39.295 30092-30092/rythmair.com.stormy I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.internal.view.WindowCallbackWrapper.onWindowStartingActionMode
10-22 21:45:39.295 30092-30092/rythmair.com.stormy W/dalvikvm: VFY: unable to resolve interface method 15458: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
10-22 21:45:39.295 30092-30092/rythmair.com.stormy D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
10-22 21:45:39.447 30092-30092/rythmair.com.stormy D/dalvikvm: create interp thread : stack size=128KB
10-22 21:45:39.447 30092-30092/rythmair.com.stormy D/dalvikvm: create new thread
10-22 21:45:39.447 30092-30092/rythmair.com.stormy D/dalvikvm: new thread created
10-22 21:45:39.447 30092-30092/rythmair.com.stormy D/dalvikvm: update thread list
10-22 21:45:39.447 30092-30110/rythmair.com.stormy D/dalvikvm: threadid=11: interp stack at 0x5fd2a000
10-22 21:45:39.447 30092-30110/rythmair.com.stormy D/dalvikvm: init ref table
10-22 21:45:39.447 30092-30110/rythmair.com.stormy D/dalvikvm: init mutex
10-22 21:45:39.447 30092-30110/rythmair.com.stormy D/dalvikvm: threadid=11: created from interp
10-22 21:45:39.447 30092-30092/rythmair.com.stormy D/dalvikvm: start new thread
10-22 21:45:39.447 30092-30110/rythmair.com.stormy D/dalvikvm: threadid=11: notify debugger
10-22 21:45:39.447 30092-30110/rythmair.com.stormy D/dalvikvm: threadid=11 (OkHttp Dispatcher): calling run()
10-22 21:45:39.447 30092-30092/rythmair.com.stormy D/MainActivity: Main UI code is running
10-22 21:45:39.448 30092-30092/rythmair.com.stormy V/ActivityThread: Performing resume of ActivityRecord{41ddf6a0 token=android.os.BinderProxy@41ddee78 {rythmair.com.stormy/rythmair.com.stormy.MainActivity}} finished=false
10-22 21:45:39.449 30092-30092/rythmair.com.stormy D/ActivityThread: ACT-AM_ON_RESUME_CALLED ActivityRecord{41ddf6a0 token=android.os.BinderProxy@41ddee78 {rythmair.com.stormy/rythmair.com.stormy.MainActivity}}
10-22 21:45:39.449 30092-30092/rythmair.com.stormy V/ActivityThread: Resume ActivityRecord{41ddf6a0 token=android.os.BinderProxy@41ddee78 {rythmair.com.stormy/rythmair.com.stormy.MainActivity}} started activity: false, hideForNow: false, finished: false
10-22 21:45:39.449 30092-30092/rythmair.com.stormy V/PhoneWindow: DecorView setVisiblity: visibility = 4 ,Parent =null, this =com.android.internal.policy.impl.PhoneWindow$DecorView{41df21d8 I.E..... R.....ID 0,0-0,0}
10-22 21:45:39.453 30092-30110/rythmair.com.stormy D/libc-netbsd: getaddrinfo: api.forecast.io NO result from proxy 
10-22 21:45:39.453 30092-30110/rythmair.com.stormy I/System.out: [CDS][DNS]Unable to resolve host "api.forecast.io": No address associated with hostname
10-22 21:45:39.459 30092-30092/rythmair.com.stormy V/ActivityThread: Resuming ActivityRecord{41ddf6a0 token=android.os.BinderProxy@41ddee78 {rythmair.com.stormy/rythmair.com.stormy.MainActivity}} with isForward=true
10-22 21:45:39.459 30092-30092/rythmair.com.stormy V/PhoneWindow: DecorView setVisiblity: visibility = 0 ,Parent =ViewRoot{41e7db18 rythmair.com.stormy/rythmair.com.stormy.MainActivity,ident = 0}, this =com.android.internal.policy.impl.PhoneWindow$DecorView{41df21d8 V.E..... R.....ID 0,0-0,0}
10-22 21:45:39.459 30092-30092/rythmair.com.stormy V/ActivityThread: Scheduling idle handler for ActivityRecord{41ddf6a0 token=android.os.BinderProxy@41ddee78 {rythmair.com.stormy/rythmair.com.stormy.MainActivity}}
10-22 21:45:39.460 30092-30092/rythmair.com.stormy D/ActivityThread: ACT-LAUNCH_ACTIVITY handled : 0 / ActivityRecord{41ddf6a0 token=android.os.BinderProxy@41ddee78 {rythmair.com.stormy/rythmair.com.stormy.MainActivity}}
10-22 21:45:39.485 30092-30092/rythmair.com.stormy D/GraphicBuffer: create handle(0x602cb298) (w:608, h:976, f:1)
10-22 21:45:39.488 30092-30092/rythmair.com.stormy I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
10-22 21:45:39.488 30092-30092/rythmair.com.stormy I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
10-22 21:45:39.489 30092-30092/rythmair.com.stormy D/GraphicBuffer: close handle(0x602cb298) (w:608 h:976 f:1)
10-22 21:45:39.492 30092-30092/rythmair.com.stormy D/GraphicBuffer: create handle(0x603cc088) (w:976, h:600, f:1)
10-22 21:45:39.494 30092-30092/rythmair.com.stormy D/OpenGLRenderer: Enabling debug mode 0
10-22 21:45:39.495 30092-30092/rythmair.com.stormy D/GraphicBuffer: create handle(0x6060a888) (w:768, h:768, f:1)
10-22 21:45:39.498 30092-30092/rythmair.com.stormy I/[MALI][Gralloc]: gralloc UREE_CreateSession recount = 0
10-22 21:45:39.498 30092-30092/rythmair.com.stormy I/[MALI][Gralloc]: gralloc call UREE_CreateSession
10-22 21:45:39.498 30092-30092/rythmair.com.stormy I/[MALI][Gralloc]: UREE_CreateSession fail, ret = -65536
10-22 21:45:39.498 30092-30092/rythmair.com.stormy W/MALI: MTK_AUX_isMTKFormat:168: int MTK_AUX_isMTKFormat(ANativeWindowBuffer_t*): format=1
10-22 21:45:39.499 30092-30092/rythmair.com.stormy D/OpenGLRenderer: setViewport 600x976 <0x603cc610>
10-22 21:45:39.510 30092-30092/rythmair.com.stormy V/InputMethodManager: onWindowFocus: null softInputMode=288 first=true flags=#1810100
10-22 21:45:39.510 30092-30092/rythmair.com.stormy V/InputMethodManager: START INPUT: com.android.internal.policy.impl.PhoneWindow$DecorView{41df21d8 V.E..... R.....I. 0,0-600,976} ic=null tba=android.view.inputmethod.EditorInfo@41e8d388 controlFlags=#104
10-22 21:45:39.519 30092-30092/rythmair.com.stormy D/GraphicBuffer: create handle(0x608ae480) (w:976, h:600, f:1)

Are you getting any errors? You ought to post your code as well as any errors. What is the device? Also, try adding a simple log statement before the dialog is suppose to fire off to be sure the code is getting that far.

1 Answer

Orbyt,

Thank you for the quick reply and my apologies for not including my code, that would have certainly helped. :)

Through a series of trial and error, (mostly those made by me), I have things working through the end of this last section in the course.

It wasn't actually hitting an error. I simply wasn't getting the expected response due to me putting my code in the wrong section of an if condition. :(

Thanks again!