Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning Android Tablet Application Development
This is the forum to discuss the Wrox book Beginning Android Tablet Application Development by Wei-Meng Lee; ISBN: 978-1-1181-0673-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Android Tablet Application Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 8th, 2012, 09:51 PM
Registered User
Points: 16, Level: 1
Points: 16, Level: 1 Points: 16, Level: 1 Points: 16, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2012
Location: Utah
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kd7vea
Default issues with fragment project

Hello, I have an issue that has me at a stand still. I have been working my way through the book, and I have gotten through the fragment project. I am on page 39 of the beginning android tablet application development. I have done all of the work through step 8 where it is time to run the app. I try to run the app, and everything loads, but the screen is just black where in the book it is green an yellow. I don't get any errors, in my code, and everything is running fine until I get a message in the emulator saying that "the application fragments has stopped unexpectedly", and then I click force close. any ideas? I am stumped. I have followed the instructions of the book, and am running windows 7. I have the most current versions of SDK, and Eclipse. I hope someone can hellp me out, because I am at a stand still until I figure this out. here is what I get in the LogCat after the failed load of Fragments.

01-08 18:35:01.384: D/AndroidRuntime(369): Shutting down VM
01-08 18:35:01.384: W/dalvikvm(369): threadid=1: thread exiting with uncaught exception (group=0x40014760)
01-08 18:35:01.514: E/AndroidRuntime(369): FATAL EXCEPTION: main
01-08 18:35:01.514: E/AndroidRuntime(369): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.kd7vea.fragments/com.kd7vea.fragments.FragmentsActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
01-08 18:35:01.514: E/AndroidRuntime(369): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:1736)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:1752)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.app.ActivityThread.access$1500(ActivityThr ead.java:123)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:993)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.os.Handler.dispatchMessage(Handler.java:99 )
01-08 18:35:01.514: E/AndroidRuntime(369): at android.os.Looper.loop(Looper.java:126)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.app.ActivityThread.main(ActivityThread.jav a:3997)
01-08 18:35:01.514: E/AndroidRuntime(369): at java.lang.reflect.Method.invokeNative(Native Method)
01-08 18:35:01.514: E/AndroidRuntime(369): at java.lang.reflect.Method.invoke(Method.java:491)
01-08 18:35:01.514: E/AndroidRuntime(369): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:841)
01-08 18:35:01.514: E/AndroidRuntime(369): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:599)
01-08 18:35:01.514: E/AndroidRuntime(369): at dalvik.system.NativeStart.main(Native Method)
01-08 18:35:01.514: E/AndroidRuntime(369): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
01-08 18:35:01.514: E/AndroidRuntime(369): at android.view.LayoutInflater.createViewFromTag(Layo utInflater.java:688)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.view.LayoutInflater.rInflate(LayoutInflate r.java:724)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.view.LayoutInflater.inflate(LayoutInflater .java:479)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.view.LayoutInflater.inflate(LayoutInflater .java:391)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.view.LayoutInflater.inflate(LayoutInflater .java:347)
01-08 18:35:01.514: E/AndroidRuntime(369): at com.android.internal.policy.impl.PhoneWindow.setCo ntentView(PhoneWindow.java:224)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.app.Activity.setContentView(Activity.java: 1777)
01-08 18:35:01.514: E/AndroidRuntime(369): at com.kd7vea.fragments.FragmentsActivity.onCreate(Fr agmentsActivity.java:11)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1048)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:1700)
01-08 18:35:01.514: E/AndroidRuntime(369): ... 11 more
01-08 18:35:01.514: E/AndroidRuntime(369): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.kd7vea.Fragments.Fragment1: make sure class name exists, is public, and has an empty constructor that is public
01-08 18:35:01.514: E/AndroidRuntime(369): at android.app.Fragment.instantiate(Fragment.java:500 )
01-08 18:35:01.514: E/AndroidRuntime(369): at android.app.Fragment.instantiate(Fragment.java:468 )
01-08 18:35:01.514: E/AndroidRuntime(369): at android.app.Activity.onCreateView(Activity.java:40 81)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.view.LayoutInflater.createViewFromTag(Layo utInflater.java:664)
01-08 18:35:01.514: E/AndroidRuntime(369): ... 20 more
01-08 18:35:01.514: E/AndroidRuntime(369): Caused by: java.lang.ClassNotFoundException: com.kd7vea.Fragments.Fragment1 in loader dalvik.system.PathClassLoader[/data/app/com.kd7vea.fragments-1.apk]
01-08 18:35:01.514: E/AndroidRuntime(369): at dalvik.system.PathClassLoader.findClass(PathClassL oader.java:251)
01-08 18:35:01.514: E/AndroidRuntime(369): at java.lang.ClassLoader.loadClass(ClassLoader.java:5 48)
01-08 18:35:01.514: E/AndroidRuntime(369): at java.lang.ClassLoader.loadClass(ClassLoader.java:5 08)
01-08 18:35:01.514: E/AndroidRuntime(369): at android.app.Fragment.instantiate(Fragment.java:490 )
01-08 18:35:01.514: E/AndroidRuntime(369): ... 23 more
01-08 18:36:08.293: I/Process(369): Sending signal. PID: 369 SIG: 9
01-08 18:36:17.183: D/AndroidRuntime(381): Shutting down VM
01-08 18:36:17.183: W/dalvikvm(381): threadid=1: thread exiting with uncaught exception (group=0x40014760)
01-08 18:36:17.237: E/AndroidRuntime(381): FATAL EXCEPTION: main
01-08 18:36:17.237: E/AndroidRuntime(381): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.kd7vea.fragments/com.kd7vea.fragments.FragmentsActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
01-08 18:36:17.237: E/AndroidRuntime(381): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:1736)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:1752)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.app.ActivityThread.access$1500(ActivityThr ead.java:123)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:993)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.os.Handler.dispatchMessage(Handler.java:99 )
01-08 18:36:17.237: E/AndroidRuntime(381): at android.os.Looper.loop(Looper.java:126)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.app.ActivityThread.main(ActivityThread.jav a:3997)
01-08 18:36:17.237: E/AndroidRuntime(381): at java.lang.reflect.Method.invokeNative(Native Method)
01-08 18:36:17.237: E/AndroidRuntime(381): at java.lang.reflect.Method.invoke(Method.java:491)
01-08 18:36:17.237: E/AndroidRuntime(381): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:841)
01-08 18:36:17.237: E/AndroidRuntime(381): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:599)
01-08 18:36:17.237: E/AndroidRuntime(381): at dalvik.system.NativeStart.main(Native Method)
01-08 18:36:17.237: E/AndroidRuntime(381): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
01-08 18:36:17.237: E/AndroidRuntime(381): at android.view.LayoutInflater.createViewFromTag(Layo utInflater.java:688)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.view.LayoutInflater.rInflate(LayoutInflate r.java:724)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.view.LayoutInflater.inflate(LayoutInflater .java:479)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.view.LayoutInflater.inflate(LayoutInflater .java:391)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.view.LayoutInflater.inflate(LayoutInflater .java:347)
01-08 18:36:17.237: E/AndroidRuntime(381): at com.android.internal.policy.impl.PhoneWindow.setCo ntentView(PhoneWindow.java:224)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.app.Activity.setContentView(Activity.java: 1777)
01-08 18:36:17.237: E/AndroidRuntime(381): at com.kd7vea.fragments.FragmentsActivity.onCreate(Fr agmentsActivity.java:11)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1048)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:1700)
01-08 18:36:17.237: E/AndroidRuntime(381): ... 11 more
01-08 18:36:17.237: E/AndroidRuntime(381): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.kd7vea.Fragments.Fragment1: make sure class name exists, is public, and has an empty constructor that is public
01-08 18:36:17.237: E/AndroidRuntime(381): at android.app.Fragment.instantiate(Fragment.java:500 )
01-08 18:36:17.237: E/AndroidRuntime(381): at android.app.Fragment.instantiate(Fragment.java:468 )
01-08 18:36:17.237: E/AndroidRuntime(381): at android.app.Activity.onCreateView(Activity.java:40 81)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.view.LayoutInflater.createViewFromTag(Layo utInflater.java:664)
01-08 18:36:17.237: E/AndroidRuntime(381): ... 20 more
01-08 18:36:17.237: E/AndroidRuntime(381): Caused by: java.lang.ClassNotFoundException: com.kd7vea.Fragments.Fragment1 in loader dalvik.system.PathClassLoader[/data/app/com.kd7vea.fragments-1.apk]
01-08 18:36:17.237: E/AndroidRuntime(381): at dalvik.system.PathClassLoader.findClass(PathClassL oader.java:251)
01-08 18:36:17.237: E/AndroidRuntime(381): at java.lang.ClassLoader.loadClass(ClassLoader.java:5 48)
01-08 18:36:17.237: E/AndroidRuntime(381): at java.lang.ClassLoader.loadClass(ClassLoader.java:5 08)
01-08 18:36:17.237: E/AndroidRuntime(381): at android.app.Fragment.instantiate(Fragment.java:490 )
01-08 18:36:17.237: E/AndroidRuntime(381): ... 23 more
01-08 18:36:23.883: I/Process(381): Sending signal. PID: 381 SIG: 9
01-08 18:39:10.523: D/AndroidRuntime(390): Shutting down VM
01-08 18:39:10.523: W/dalvikvm(390): threadid=1: thread exiting with uncaught exception (group=0x40014760)
01-08 18:39:10.583: E/AndroidRuntime(390): FATAL EXCEPTION: main
01-08 18:39:10.583: E/AndroidRuntime(390): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.kd7vea.fragments/com.kd7vea.fragments.FragmentsActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
01-08 18:39:10.583: E/AndroidRuntime(390): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:1736)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.app.ActivityThread.handleLaunchActivity(Ac tivityThread.java:1752)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.app.ActivityThread.access$1500(ActivityThr ead.java:123)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.app.ActivityThread$H.handleMessage(Activit yThread.java:993)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.os.Handler.dispatchMessage(Handler.java:99 )
01-08 18:39:10.583: E/AndroidRuntime(390): at android.os.Looper.loop(Looper.java:126)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.app.ActivityThread.main(ActivityThread.jav a:3997)
01-08 18:39:10.583: E/AndroidRuntime(390): at java.lang.reflect.Method.invokeNative(Native Method)
01-08 18:39:10.583: E/AndroidRuntime(390): at java.lang.reflect.Method.invoke(Method.java:491)
01-08 18:39:10.583: E/AndroidRuntime(390): at com.android.internal.os.ZygoteInit$MethodAndArgsCa ller.run(ZygoteInit.java:841)
01-08 18:39:10.583: E/AndroidRuntime(390): at com.android.internal.os.ZygoteInit.main(ZygoteInit .java:599)
01-08 18:39:10.583: E/AndroidRuntime(390): at dalvik.system.NativeStart.main(Native Method)
01-08 18:39:10.583: E/AndroidRuntime(390): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
01-08 18:39:10.583: E/AndroidRuntime(390): at android.view.LayoutInflater.createViewFromTag(Layo utInflater.java:688)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.view.LayoutInflater.rInflate(LayoutInflate r.java:724)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.view.LayoutInflater.inflate(LayoutInflater .java:479)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.view.LayoutInflater.inflate(LayoutInflater .java:391)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.view.LayoutInflater.inflate(LayoutInflater .java:347)
01-08 18:39:10.583: E/AndroidRuntime(390): at com.android.internal.policy.impl.PhoneWindow.setCo ntentView(PhoneWindow.java:224)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.app.Activity.setContentView(Activity.java: 1777)
01-08 18:39:10.583: E/AndroidRuntime(390): at com.kd7vea.fragments.FragmentsActivity.onCreate(Fr agmentsActivity.java:11)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.app.Instrumentation.callActivityOnCreate(I nstrumentation.java:1048)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.app.ActivityThread.performLaunchActivity(A ctivityThread.java:1700)
01-08 18:39:10.583: E/AndroidRuntime(390): ... 11 more
01-08 18:39:10.583: E/AndroidRuntime(390): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.kd7vea.Fragments.Fragment1: make sure class name exists, is public, and has an empty constructor that is public
01-08 18:39:10.583: E/AndroidRuntime(390): at android.app.Fragment.instantiate(Fragment.java:500 )
01-08 18:39:10.583: E/AndroidRuntime(390): at android.app.Fragment.instantiate(Fragment.java:468 )
01-08 18:39:10.583: E/AndroidRuntime(390): at android.app.Activity.onCreateView(Activity.java:40 81)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.view.LayoutInflater.createViewFromTag(Layo utInflater.java:664)
01-08 18:39:10.583: E/AndroidRuntime(390): ... 20 more
01-08 18:39:10.583: E/AndroidRuntime(390): Caused by: java.lang.ClassNotFoundException: com.kd7vea.Fragments.Fragment1 in loader dalvik.system.PathClassLoader[/data/app/com.kd7vea.fragments-1.apk]
01-08 18:39:10.583: E/AndroidRuntime(390): at dalvik.system.PathClassLoader.findClass(PathClassL oader.java:251)
01-08 18:39:10.583: E/AndroidRuntime(390): at java.lang.ClassLoader.loadClass(ClassLoader.java:5 48)
01-08 18:39:10.583: E/AndroidRuntime(390): at java.lang.ClassLoader.loadClass(ClassLoader.java:5 08)
01-08 18:39:10.583: E/AndroidRuntime(390): at android.app.Fragment.instantiate(Fragment.java:490 )
01-08 18:39:10.583: E/AndroidRuntime(390): ... 23 more
01-08 18:39:20.198: I/Process(390): Sending signal. PID: 390 SIG: 9


Similar Threads
Thread Thread Starter Forum Replies Last Post
Xpath more specific or return tree fragment or nodes peterdums BOOK: XSLT Programmer's Reference, 2nd Edition 0 November 26th, 2009 09:10 AM
for-each on result tree fragment RoeZ XSLT 11 November 22nd, 2007 07:31 AM
un escape text to use as fragment brenchley XSLT 1 December 13th, 2005 10:25 AM
Connection issues from an Access project VBAHole22 SQL Server 2000 2 June 13th, 2003 08:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.