• 10

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I'm new to Android development and I just installed Android Studio version I created a project, HelloWorld, and chose the default blank activity, Darcula theme, and default API. Straight out of the box, without having written any code or touched anything, I get this message:

"Rendering Problems Missing styles. Is the correct theme chosen for this layout? Use the Theme combo box above the layout to choose a different layout, or fix the theme style references. Failed to find style 'textViewStyle' in current theme (4 similar errors not shown)."

I uninstalled and reinstalled Android Studio but I still get this error so I'm not sure what else I should do. It says "use the theme combo box... or fix the theme style references" and I'm new to Android Studio so I have no idea where the box is or how to change the reference.

Android gives you the option to define your own style format, which the default project you made did. It created a style named 'textViewStyle'.

If you look at the text view instead of the design view (you can switch by pressing the tab at the lower left in the part where you get the error that it can't render) you will see that the textView or the app itself contains a line android:theme="@style/textViewStyle".

You can either remove this line, or track down the error in the styles.xml file in the res/values folder. This is the file that defines the style for the app.

If this doesn't help you it could be that the style is defined in your AndroidManifest.xml file, look at the tag, it will contain a line saying android:theme="@android:style/textViewStyle", change that to android:theme="@android:style/Theme.DeviceDefault" and you should be good to go.

More info on custom themes: http://developer.android.com/guide/topics/ui/themes.html

Since you are a beginner, more on general Android development: http://developer.android.com

  • 6
Reply Report