2016-02-28 155 views
4

我剛剛安裝的Android Studio,但,當我開始它告訴我:Android Studio中,渲染問題

呈現問題以下類不能被實例化:

android.support.design.widget.FloatingActionButton (Open Class, Show Exception, Clear Cache) 

Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE  
Exception Details android.content.res.Resources$NotFoundException: Unable to find resource ID #0x1080029 
at android.content.res.Resources.getResourceName(Resources.java:2235)   
at android.content.res.Resources.loadDrawableForCookie(Resources.java:2602)    at android.content.res.Resources.loadDrawable(Resources.java:2540)    
at android.content.res.Resources.getDrawable(Resources.java:806)    
at android.content.Context.getDrawable(Context.java:458)    
at android.support.v4.content.ContextCompatApi21.getDrawable(ContextCompatApi21.java:26)    
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:321)    
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:180)    
at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:70)    
at android.support.v7.widget.AppCompatImageHelper.loadFromAttributes(AppCompatImageHelper.java:39)    
at android.support.v7.widget.AppCompatImageButton.<init>(AppCompatImageButton.java:65)    
at android.support.design.widget.VisibilityAwareImageButton.<init>(VisibilityAwareImageButton.java:37)   
at android.support.design.widget.FloatingActionButton.<init>(FloatingActionButton.java:109)    
at android.support.design.widget.FloatingActionButton.<init>(FloatingActionButton.java:105)    
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)    
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)    
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:835)    
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)    at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)    
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)    
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)    
at android.view.LayoutInflater.inflate(LayoutInflater.java:394) Copy stack to clipboard 

我能做些什麼?

+0

嘗試清理和重建解決方案,並且您必須完全訪問互聯網,Android Studio會在第一次渲染時下載內容 –

回答

1

只更新SDK將解決問題。您可以通過Android studio更新SDK - >幫助 - >檢查更新 - >並單擊立即更新或打開SDK文件夾並手動運行'SDK Manager.exe'並更新所有可用的SDK更新。有時Android工作室會更新,但SDK不會。手動更新SDK。 (在桌面上保留'SDK Manager.exe'的快捷方式將是一個有用的提醒)。