Rendering Problems in Android Studio V 1.1/1.2

Rendering problems in Android Studio v 1.1 / 1.2

I don't know if this will help or not, but I was creating a test project (direct from the wizard, no custom code) and getting this error. Trying to modify the project structure and find the missing class didn't help.

The build failed with the following error:

***rendering problems

The following classes could not be found
android.support.v7.internal.widget.ActionBarOverlayLayout***

Obviously it's not the final solution, but changing the Theme in design view from the base "project theme" to anything else allows it to build.

Android Studio Rendering Problems : The following classes could not be found

You have to do two things:

  • be sure to have imported right appcompat-v7 library in your project structure -> dependencies
  • change the theme in the preview window to not an AppCompat theme. Try with Holo.light or Holo.dark for example.

Problems with androidstudio

I had the same problem, try to change the API (you are using API 23 on your layout), try to put it to API 21 if it doesn't work try to restart Android Studio.

That's how you change the API

Sample Image

For more information look at this question and this one

Android Studio: Cannot resolve R

I would guess it's either:

  1. You have no resources (drawables, layouts, etc) in your "res" dir. Workaround: create a dummy strings.xml file or something.
  2. Your class' package name is different from your application's package name (in which case, you have to import the R class from com.example.mypackage)

Unable to run application in Android Studio

For design xml part switch your API level from 22 to API 21 (change it from small android icon at the top of your xml file),

OR

Go to res/value/styles.xml and change your AppTheme from

Theme.AppCompat.Light.DarkActionBar
to

Base.Theme.AppCompat.Light.DarkActionBar

See Reference Link here for design rendering exception.

For your initial emulator error

C:\Users\ga\AppData\Local\Android\sdk1\tools\emulator.exe -avd Nexus_5_API_21_x86 -netspeed full -netdelay none
emulator: ERROR: This AVD's configuration is missing a kernel file!!
emulator: ERROR: ANDROID_SDK_ROOT is undefined

Refer this link -

1 - Reference link1

2 - Reference link2

Html List tag not working in android textview. What can I do?

As you can see in the Html class source code, Html.fromHtml(String) does not support all HTML tags. In this very case, <ul> and <li> are not supported.

From the source code I have built a list of allowed HTML tags:

  • br
  • p
  • div
  • em
  • b
  • strong
  • cite
  • dfn
  • i
  • big
  • small
  • font
  • blockquote
  • tt
  • monospace
  • a
  • u
  • sup
  • sub

So you better use WebView and its loadDataWithBaseURL method. Try something like this:

String str="<html><body>A dressy take on classic gingham in a soft, textured weave of stripes that resembles twill.  Take a closer look at this one.<ul><li>Trim, tailored fit for a bespoke feel</li><li>Medium spread collar, one-button mitered barrel cuffs</li><li>Applied placket with genuine mother-of-pearl buttons</li><li>;Split back yoke, rear side pleats</li><li>Made in the U.S.A. of 100% imported cotton.</li></ul></body></html>";
webView.loadDataWithBaseURL(null, str, "text/html", "utf-8", null);


Related Topics



Leave a reply



Submit