نصب نشدن برنامه روی شبیه ساز

پرسیده شده
فعالیت 1176 روز پیش
دیده شده 846 بار
2

سلام خسته نباشید

ببخشید من ui رو طراحی کردم و تمامی نکات رو رعایت کردم، ولی وقتی شبیه ساز رو اجرا میکنم شبیه ساز اجرا میشه و برنامه ای که ساختم باید نصب بشه بالا بیاد ولی بالا نمیاد؟

از شکن هم استفاده کردم، گردل هم سینک میشه

ولی این ارور رو میده

فایل پیوست

ابوالفضل
ابوالفضل

19 بهمن 99

3
حذف شده

سلام مجدد

 

مشکلات کد :

android:layout_width="100"
android:layout_height="100"

و همینطور 

android:paddingEnd="12"

 

علت خطا: مشخص نکردن dp.

روش خطایابی : به خطوط قرمز رنگ توجه کنید

یعنی:

android:layout_width="100dp"
android:layout_height="100dp"
android:paddingEnd="12dp"

 

فایل پیوست

پوریا شفیعی

توسط

پوریا شفیعی

19 بهمن 99

1
حذف شده

سلام وقت بخیر

 

 کد های xml فایل activity_main رو ارسال بفرمایید.

فایل پیوست

پوریا شفیعی

توسط

پوریا شفیعی

19 بهمن 99

1
حذف شده
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white"
    tools:context=".MainActivity">

    <ImageView
        android:id="@+id/imageView2"
        android:layout_width="100"
        android:layout_height="100"
        android:layout_marginTop="16dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.498"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/button4"
        app:srcCompat="@drawable/logo_profile" />

    <Button
        android:id="@+id/button2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="24dp"
        android:layout_marginEnd="8dp"
        android:background="@drawable/background_primary"
        android:paddingStart="15dp"
        android:paddingEnd="15dp"
        android:text="@string/editProfile"
        android:textColor="#FFFFFF"
        app:layout_constraintEnd_toStartOf="@+id/button"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/textView" />

    <Button
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:background="@drawable/background_secondary"
        android:paddingStart="15dp"
        android:paddingEnd="15dp"
        android:text="@string/viewWebsite"
        android:textColor="#009688"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toEndOf="@+id/button2"
        app:layout_constraintTop_toTopOf="@+id/button2" />

    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.498"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/imageView2"
        tools:text="@android:string/unknownName" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/guideline"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_begin="24" />

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="24dp"
        android:text="@string/skills"
        app:layout_constraintStart_toStartOf="@+id/guideline"
        app:layout_constraintTop_toBottomOf="@+id/button2" />

    <CheckBox
        android:id="@+id/checkBox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:text="@string/androidDevelopment"
        app:layout_constraintStart_toStartOf="@+id/guideline"
        app:layout_constraintTop_toBottomOf="@+id/textView2" />

    <CheckBox
        android:id="@+id/checkBox2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/uiDesign"
        app:layout_constraintStart_toStartOf="@+id/guideline"
        app:layout_constraintTop_toBottomOf="@+id/checkBox" />

    <CheckBox
        android:id="@+id/checkBox3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/deepLearning"
        app:layout_constraintStart_toStartOf="@+id/guideline"
        app:layout_constraintTop_toBottomOf="@+id/checkBox2" />

    <TextView
        android:id="@+id/textView4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="24dp"
        android:text="@string/provinceCity"
        app:layout_constraintStart_toStartOf="@+id/guideline"
        app:layout_constraintTop_toBottomOf="@+id/checkBox3" />

    <RadioButton
        android:id="@+id/radioButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:text="@string/tehran"
        app:layout_constraintStart_toStartOf="@+id/guideline"
        app:layout_constraintTop_toBottomOf="@+id/textView4" />

    <RadioButton
        android:id="@+id/radioButton2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/gilanRasht"
        app:layout_constraintStart_toStartOf="@+id/guideline"
        app:layout_constraintTop_toBottomOf="@+id/radioButton" />

    <RadioButton
        android:id="@+id/radioButton3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/alborzKaraj"
        app:layout_constraintStart_toStartOf="@+id/guideline"
        app:layout_constraintTop_toBottomOf="@+id/radioButton2" />

    <Button
        android:id="@+id/button3"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:background="@color/design_default_color_primary_variant"
        android:text="@string/saveInformation"
        android:textColor="#FFFFFF"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <Button
        android:id="@+id/button4"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:background="@color/white"
        android:elevation="10dp"
        android:gravity="center_vertical"
        android:paddingStart="12dp"
        android:paddingEnd="12"
        android:text="@string/app_name"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
فایل پیوست

ابوالفضل

توسط

ابوالفضل

19 بهمن 99

1
حذف شده

دمت گرم

ولی هنوز نصب نمیشه، ارورش اینه,‘,,’

فایل پیوست

ابوالفضل

توسط

ابوالفضل

19 بهمن 99

حذف شده
هنوز در همون activity_main ارور دارید پیشنهاد میکنم بار دیگر ویدیو رو ببینید و حتما بار دیگر پروژه رو بزنید
پوریا شفیعی

20 بهمن 99

2
حذف شده

سلام امیدوارم حالتون خوب باشه 

ممنون از پوریای عزیز برای پاسخ و وقت ارزشمندی که میذاره 

 

نظر من اینه که مشکل از resource هایی هست که در فایل xml استفاده شده که احتمالا به این خاطر هست که یا آدرس اون resource اشتباه داده شده یا وجود نداره که ممکن هست از پوشه drawable و یا 

فایل‌های string, theme, style باشه

 

با آرزوی سلامتی و موفقیت

فایل پیوست

Hamidreza Karimi

توسط

Hamidreza Karimi

20 بهمن 99

0
حذف شده

سلام مشکل حل شد

ممنون از دوستان مخصوصا پوریای عزیز

مشکل از همون dp که گفتن و تو Theme.xml یه سری رفرنس داده شده بود به رنگ ها که من اون منبع رو پاک کرده بودم:|

فایل پیوست

ابوالفضل

توسط

ابوالفضل

20 بهمن 99