رفتن به مطلب
انجمن اندروید ایران | آموزش برنامه نویسی اندروید و موبایل
  • android.png.1fab383bc8500cd93127cebc65b1dcab.png

ارور Failed to load AppCompat ActionBar with unknown error.


پست های پیشنهاد شده

سلام علیکم

من تازه دارم اندروید استودیو رو یاد میگیرم بعد از اینکه اولین پروژه رو ساختم وقتی وارد لایوت ویک دکمه اضافه کردم با ارور های زیر مواجه شدم

در ضمنTextView و  Button و ... نمایش داده نمیشوند


 

render problem*

Failed to load AppCompat ActionBar with unknown error.

 Tip: Try to refresh the layout.

 missing constraints in  constraintLayout*

This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime unless you add the constraints  The layout editor allows you to place widgets anywhere on the canvas, and it records the current position with designtime attributes (such as layout_editor_absoluteX). These attributes are not applied at runtime, so if you push your layout on a device, the widgets may appear in a different location than shown in the editor. To fix this, make sure a widget has both horizontal and vertical constraints by dragging from the edge connections. 

hardcoded text*

Hardcoded string "Button", should use @string resource  Hardcoding text attributes directly in layout files is bad for several reasons:  * When creating configuration variations (for example for landscape or portrait)you have to repeat the actual text (and keep it up to date when making changes)  * The application cannot be translated to other languages by just adding new translations for existing string resources.  There are quickfixes to automatically extract this hardcoded string into a resource lookup.

filed to instantait one or more classes *

The following classes could not be instantiated:
- android.support.v7.widget.ActionBarContainer (Open Class, Show Exception, Clear Cache)
- android.support.v7.widget.ActionBarContextView (Open Class, Show Exception, Clear Cache)
- android.support.v7.app.WindowDecorActionBar (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.  If this is an unexpected error you can also try to build the project, then manually refresh the layout.  Exception Details java.lang.ClassNotFoundException: android.view.View$OnUnhandledKeyEventListener Copy stack to clipboard

1.PNG

2.PNG

3.PNG

لینک ارسال
به اشتراک گذاری در سایت های دیگر
  • 3 هفته بعد...

در bulid.gradle برای استفاده از appCompat.v7  باید خط زیر رو وارد کنید

implementation 'com.android.support:appcompat-v7:26.0.2'

 ودر مورد اررور hardcoded @string  باید نام ویجت را چک کنید و مسیر زیر رو بازبینی کنید

res>valus>string

ویرایش شده توسط aminkhan
لینک ارسال
به اشتراک گذاری در سایت های دیگر

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...