بروز خطا
   [message]
اشتراک در سوال
رای ها
[dataList]
پرسش و پاسخ

پیغام خطا در تمرین اول

مدیریت گفتگو
Ali_Shabani 11 سال پیش
آخرین تغییر: 11 سال پیش

با سلا استاد من تمرین اول را انام دادم طراحی کامل ولی با دو پیغام خطا مواه شدم  لطفا برنامه را بررسی و راهنمایی بفرمایید.

لینک برنامه : http://uplod.ir/exztomnrtbqn/my_startup1.zip.htm

 

نظرات

پاسخ‌ها 2

Astro 11 سال پیش

سلام دوست عزیز.

طول و عرض رو نباید با 0 خالی وارد کنید. باید به صورت 0dip وارد کنید.

کد اصلاح شده لایه xml شما با در نظر گرفتن نکته بالا :

 <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >


<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<LinearLayout
android:layout_width="0dip"
android:layout_height="fill_parent"
android:orientation="vertical" android:layout_weight="1">

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0dip" android:layout_weight=".25">

<TextView
android:id="@+id/TextView01"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:background="#00ff00" android:layout_weight=".5" android:layout_margin="2dip"/>

<TextView
android:id="@+id/TextView02"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight=".5"
android:background="#00ff00" android:layout_margin="2dip"/>

</LinearLayout>

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight=".25" >

<TextView
android:id="@+id/textView1"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_margin="2dip"
android:layout_weight="1"
android:background="#00ff00" />
</LinearLayout>

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight=".25" >

<TextView
android:id="@+id/TextView03"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_margin="2dip"
android:layout_weight="1"
android:background="#00ff00" />
</LinearLayout>


<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0dip" android:layout_weight=".25">

<TextView
android:id="@+id/TextView05"
android:layout_width="48dip"
android:layout_height="fill_parent"
android:layout_margin="2dip"
android:background="#00ff00" />

<TextView
android:id="@+id/TextView04"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_margin="2dip"
android:layout_weight="1"
android:background="#00ff00" />
</LinearLayout>

</LinearLayout>

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >

<LinearLayout
android:layout_width="100dip"
android:layout_height="150dip"
android:orientation="vertical" >

<TextView
android:id="@+id/TextView06"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="2dip"
android:background="#ff0000" />

</LinearLayout>

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0dip"
android:orientation="vertical" android:layout_weight="1">

<TextView
android:id="@+id/TextView15"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_margin="2dip"
android:layout_weight=".5"
android:background="#0000ff" />

<TextView
android:id="@+id/TextView14"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_margin="2dip"
android:layout_weight=".5"
android:background="#0000ff" />

</LinearLayout>

</LinearLayout>

</LinearLayout>

</LinearLayout>

نظرات

Ali_Shabani 11 سال پیش

سلام با تشکر از راهنمایتون مشکل قبلی حل شد حالا با پیغام زیر مواجه میشم.


[2015-01-15 11:00:48 - my_startup1] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.topnik.curse.app.my_startup1/.My_startup1Activity }
[2015-01-15 11:00:48 - my_startup1] ActivityManager: Warning: Activity not started, its current task has been brought to the front
[2015-01-15 11:29:09 - my_startup1] Error in an XML file: aborting build.

 

نظرات

MeY3am 11 سال پیش
میگه اکتیویتی فعلی در حال اجرا هستش اول اکتیویتی در حال اجرا رو ببند بعدش دوباره اجرا کن!
راه ديگه اش هم اينه كه توي پروژه يه حرف اضافي بزن و بعد پاكش كن و بعد پروژه رو اجرا كن. اين باعث ميشه كه پروژه از اول دوباره كامپايل بشه و اجرا بشه.

پاسخگویی و مشاهده پاسخ های این سوال تنها برای اعضای ویژه سایت امکان پذیر است .
چنانچه تمایل دارید به همه بخش ها دسترسی داشته باشید میتوانید از این بخش لایسنس این آموزش را خریداری نمایید .