简体   繁体   中英

Android studio rendering problems,

I have seen this answer My question is not for specific 'Rendering problem' but any 'Rendering problem' and I don't want to reduce my designer preview API level too. I want to know why is this error shown. And, mostly after updating 'Android Studio'. For now, this 'Rendering problem' was shown with following description:

 The following classes could not be instantiated:
 android.support.design.widget.FloatingActionButton (Open Class, Show Exception, Clear Cache)
 Tip: Use View.isInEditMode()
 ...
 ...

Any proper solution, considering subsequent updates?

Solution: Update 'Android SDK' (preferably by running 'SDK Manager.exe'). Tick all the packages and install them all.

SDK Manager.exe is buggy. While the tools are downloaded, many of times it will show downloading errors. Errors in downloading this and errors in downloading that and stops downloading or skips that item. If all the updates and packages required in new API level are not downloaded, a 'Rendering problem' will be shown. We generally don't check whether SDK is up-to-date or no. Thus such errors are thrown. For me, till today, SDK hasn't updated on a single click. I have to retry it multiple times to update the full SDK.

I would like to add a quick fix for a rendering problem i had, for android studio beginners like me. Some references to dimensions, styles or strings could not be resolved, so it would show things like "@strings/some_string" instead of the actual text.
I fixed my rendering problems by clicking Refresh on the upper right side of the design view.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM