5

This is the error I'm getting in my layout XML files:

error!
NotFoundException: null
Exception details are logged in Window > Show View > Error Log
The following classes could not be found:
- TextView (Change to android.widget.TextView, Fix Build Path, Edit XML)

This happened after updating my SDK tools in Eclipse. However, I can still compile my code, I just can't see the graphical part of my layout.

Recently, I also added the RootTools library, could that also be the cause?

Thank you!

5 Answers 5

6

I had the same problem. And it turned out to be a very strange thing. In my strings.xml file I had a line

<string name="email_seperator_char">\@</string>

And this was causing the problem. Even if I use the escape character for @ sign preview was not working after SDK update.

SOLUTION: I just added a space in front of it and voila, it worked.

<string name="email_seperator_char"> \@</string>

I know it is strange and it may not be acceptable for some apps to have an space infront of it. But that was ok for my app. Hope this helps.

And in design mode, in graphical layout, you have a new icon, (android icon), click and select 8 minimum.

1

I'm not sure it helps in your case, but I found out what was the problem with mine. To support older Android devices, I lowered my project build target to API level 7 (Android 2.1) from the previous value of API Level 8 (Android 2.2).

There might be an issue with the 2.1 layout renderer, it kept crashing on my TextView's property android:textAppearance="?android:attr/textAppearanceMedium". Even when I removed it, rendering was working but had a strange appearance (grey background, tiny black text). Switching the API level back fixed the layout editor straight away.

To change it, go to your project properties, select Android on the right, then tick the box next to your desired API level under Project Build Target.

0

I ve got the same issue just a minutes ago, try to lower the API level, press the andorid green icon in the layout editor screen and on the dropdown menu select API 7. I think it would be work out.

0

I've been having similar issues. After reading a number of these posts, I've found that there is probably a bug in the layout renderer for Android 4.0.3. An error message is listed (ROOT Exception details are logged in Window > Show View > Error Log) even when all parts of the project are set to Android 4.0.3 and SDK 15.

If I set the layout renderer to Android 2.2 and leave everything else set to Android 4.0.3, SDK 15, then it all appears to work just fine.

I hope this is useful.

0

there is something wrong in your TextView

one time I wrote this which cause the problem

android:textAppearance="@android:attr/textAppearanceLarge"

the Eclipse can`t tell that is wrong but the design view crashes,when I realized that,I change @ to ?

android:textAppearance="?android:attr/textAppearanceLarge"

then all comes to normal

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.