مشکل اجرا نشدن پیش نمایش دیزاینر
با سلام.
من وقتی وارد محیط دیزاینر میشم هیچ پیش نمایشی برا نمیاره و ارور
Failed to load AppCompat ActionBar with unknown error.
رو برام میاره .
و هر layout یا widget که اضافه می کنم رو هم نشون نمیده .
این هم ارور بعدیش
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.
و وارنینگ بعدی
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
از اونجایی این خطا برای شما پیش اومده که در برنامه ی خودتون هنوز هیچی لایه ای قرار ندادید.
توجه داشته باشید که برای هر برنامه ای باید در صفحه ی اصلی اون یک لایه ای بندازید حالا مطابق توضیحاتی که توی ارور بود یا لایه ی شما باید RelativeLayout باشه و یا LinearLayout .
پس بخاطر داشته باشید که ابتدا قبل از درگ کردن هر نوع ویجتی ، شما باید یک لایه روی صفحه بندازید، متناسب با نیازتون یکی از دو نوع بالا رو انتخاب کنید ، سپس هر ویجتی که خواستید رو توی اون لایه قرار بدید.
موفق باشید
پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .
