Вот коды.Почему мое простое приложение не запускается?
package com.example.appfit;
import android.app.Activity;
import android.os.Bundle;
class Main extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.select);
}
}
Я не могу получить, когда я пытаюсь запустить это, я, к сожалению, остановился, проблема. Также здесь есть select.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/tvSelect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/select"
android:textSize="18sp"
android:layout_gravity="center"
/>
</LinearLayout>
В чем проблема?
Также Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.appfit"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.appfit.Main"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Я не знаю, как получить ошибки? Я действительно новичок.
опубликовать LogCat – Manishika
Попробуйте подключиться к бревну устройства с помощью: 'ADB -e LogCat' для эмулятора или «adb -d logcat» для устройства - он даст вам полный сброс стека. – elimirks
Используйте Logcat. Возможно, опубликуйте свой манифест android –