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 trialbreyonnamingledoff
2,600 PointsFun Facts Error?
I have been stuck on this video for 2 days now, My Emulator has been working and after entering the code from the video onto FunFactsActivity.java i am no longer able to run the app?I have also gone back from scratch but i still get the same results.Every time i try and launch it says Fun Facts has stopped working?
ayush mittal
112 PointsI am not able to launch Emulator, however I have followed all steps of setting it up from tutorial.
Code :
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".FunFactsActivity">
<TextView
android:text="hello world"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
Error :
C:\Users\Gourav\AppData\Local\Android\sdk\tools\emulator.exe -avd Android_442 netspeed full -netdelay none emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it. could not get wglGetExtensionsStringARB could not get wglGetExtensionsStringARB could not get wglGetExtensionsStringARB could not get wglGetExtensionsStringARB could not get wglGetExtensionsStringARB could not get wglGetExtensionsStringARB could not get wglGetExtensionsStringARB could not get wglGetExtensionsStringARB getGLES1ExtensionString: Could not find GLES 1.x config! Failed to obtain GLES 1.x extensions string! Could not initialize emulated framebuffer
Please Suggest.....
5 Answers
drizzy drake
Courses Plus Student 2,469 Pointsis your id for factTextView TextView for your label in the xml e.g. android:id="@+id/FactTextView" and showFactButton for your Button id e.g. android:id="@+id/showFactButton"
breyonnamingledoff
2,600 Pointsyes it is?
breyonnamingledoff
2,600 PointsError:(30, 23) error: method setOnClickListener in class View cannot be applied to given types; required: OnClickListener found: no arguments reason: actual and formal argument lists differ in length
how do I fix this?
Ben Jakuben
Treehouse TeacherYour code looks totally fine and matches mine. Can you try cleaning and rebuilding your project? If it still gives you the error, zip up your code and post it somewhere and link it here or send it support@teamtreehouse.com and ask them to forward it to me.
Ben Jakuben
Treehouse TeacherYou error jumped out at me when I plugged your code into my own project and tried to run it:
Do you get that kind of view about the error when you run it?
In this case, it can't find the ID showFactButton
. That's because the ID in your layout file has a capital "S": ShowFactButton
. Try switching that to lowercase and see if you can now run your app. :)
breyonnamingledoff
2,600 PointsThank You Ben, it worked!It took me 2 days and it was as simple as a lower case letter! Thanks Again.
breyonnamingledoff
2,600 Pointsbreyonnamingledoff
2,600 Points