2016-06-01 4 views
2

최근에 Android 개발이 처음 생겼습니다. 오류의 원인을 찾는 데 도움이 필요합니다. 나는 어제 내 프로젝트에서 일하고 있었는데 그걸 닫을 때까지 잘 돌아가고 있었고 그 다음날 나는 렌더링 문제를 받아서 미리보기 화면을 보지 못하게했다.Android Studio 스택 추적 오류

android.content.res.Resources$NotFoundException 
    at com.android.layoutlib.bridge.android.BridgeContext.obtainStyledAttributes(BridgeContext.java:626) 
    at android.content.res.Resources_Theme_Delegate.obtainStyledAttributes(Resources_Theme_Delegate.java:71) 
    at android.content.res.Resources$Theme.obtainStyledAttributes(Resources.java:1512) 
    at android.widget.TextView.<init>(TextView.java:728) 
    at android.widget.TextView.<init>(TextView.java:671) 
    at android.widget.TextView.<init>(TextView.java:667) 
    at com.android.layoutlib.bridge.MockView.<init>(MockView.java:50) 
    at com.android.layoutlib.bridge.MockView.<init>(MockView.java:45) 
    at com.android.layoutlib.bridge.MockView.<init>(MockView.java:41) 
    at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:163) 
    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.rInflate_Original(LayoutInflater.java:838) 
    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.rInflate_Original(LayoutInflater.java:838) 
    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) 
    at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:229) 
    at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:426) 
    at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350) 
    at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:520) 
    at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:508) 
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:967) 
    at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:508) 
    at com.android.tools.idea.rendering.RenderTask.access$600(RenderTask.java:75) 
    at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:620) 
    at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:617) 
    at com.android.tools.idea.rendering.RenderService.runRenderAction(RenderService.java:371) 
    at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:617) 
    at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:639) 
    at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$7.run(AndroidDesignerEditorPanel.java:519) 
    at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:337) 
    at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:327) 
    at com.intellij.util.ui.update.MergingUpdateQueue$3.run(MergingUpdateQueue.java:271) 
    at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:286) 
    at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:244) 
    at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:234) 
    at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) 
    at com.intellij.util.Alarm$Request$1.run(Alarm.java:352) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 

을 내가 프로젝트에에 일한 내 파일 : 다른 파일에 대한 코드가 필요한 경우

activity_sign_in.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:gravity="center_horizontal" 
    android:orientation="vertical" 
    android:paddingBottom="@dimen/activity_vertical_margin" 
    android:paddingLeft="@dimen/activity_horizontal_margin" 
    android:paddingRight="@dimen/activity_horizontal_margin" 
    android:paddingTop="@dimen/activity_vertical_margin" 
    tools:context="com.example.dominik.agwumd.SignIn" 
    android:background="@drawable/background_color"> 

    <!-- Login progress --> 
    <ProgressBar 
     android:id="@+id/login_progress" 
     style="?android:attr/progressBarStyleLarge" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_marginBottom="8dp" 
     android:visibility="gone" /> 

    <ImageView 
     android:layout_width="305dp" 
     android:layout_height="266dp" 
     android:id="@+id/imageView2" 
     android:contentDescription="@string/agwumd_logo" 
     android:src="@drawable/final_agwumd_logo" /> 

    <LinearLayout 
     android:id="@+id/email_login_form" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:orientation="vertical" 
     android:weightSum="1" 
     android:gravity="bottom|center" 
     android:clickable="true"> 

     <android.support.design.widget.TextInputLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content"> 

      <AutoCompleteTextView 
       android:id="@+id/email" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:hint="@string/username1" 
       android:inputType="textEmailAddress" 
       android:maxLines="1" 
       android:singleLine="true" 
       android:textColor="@color/colorAccent" 
       android:textColorHint="@color/colorAccent" 
       android:textAppearance="@color/colorAccent" 
       android:textColorHighlight="@color/colorAccent" 
       android:textColorLink="@color/colorAccent" 
       android:text="@string/username" /> 

     </android.support.design.widget.TextInputLayout> 

     <android.support.design.widget.TextInputLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content"> 

      <EditText 
       android:id="@+id/password" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:hint="@string/password" 
       android:imeActionId="@+id/login" 
       android:imeActionLabel="@string/action_sign_in_short" 
       android:imeOptions="actionUnspecified" 
       android:inputType="textPassword" 
       android:maxLines="1" 
       android:singleLine="true" 
       android:textColor="@color/colorAccent" 
       android:textColorHint="@color/colorAccent" 
       android:textColorHighlight="@color/colorAccent" 
       android:textColorLink="@color/colorAccent" 
       android:textAppearance="@color/colorAccent" 
       android:textIsSelectable="true" /> 

     </android.support.design.widget.TextInputLayout> 

     <Button 
      android:id="@+id/email_sign_in_button" 
      style="?android:textAppearanceSmall" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_marginTop="16dp" 
      android:text="@string/sign_in" 
      android:background="@color/colorAccent" 
      android:textColor="#306e50" 
      android:textStyle="bold" /> 

    </LinearLayout> 

</LinearLayout> 

다음과 같이 내 스택 추적입니다

enter image description here

답변

2
  android:textAppearance="@color/colorAccent" 
: 여기 내 프로젝트 메뉴입니다

이 두 줄은 내 XML에서 제 문제였습니다. 값을 잘못 설정해야합니다. 나는 다른 누구를 위해이 포스트를 떠날 생각.