我在 Eclipse 中有一个全新的 Android 项目,一个带有一个简单文本视图的活动,黑色背景,仅此而已。除了添加一些权限以听取互联网上的一些建议外,我没有进行任何修改。
当然有一些关于这个问题的线程,但大多数它们被标记为错误打开跟踪文件的副本:没有这样的文件或目录(2)。但是该线程中的解决方案是“重新安装所有内容” - 这对我来说不是一个好的答案。我想知道出了什么问题以及如何修复它。
请帮助我得到一个答案,我会真正理解这里出了什么问题。
正如我所说,这是一个新的 Eclipse 项目,但如果您需要一些代码,请写评论。
在此先感谢您的帮助。
编辑:
我的清单:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yellowjello.sejmipolitika"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<activity
android:name=".Main"
android:screenOrientation="landscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
我的爪哇:
package com.yellowjello.sejmipolitika;
import android.app.Activity;
import android.os.Bundle;
public class Main extends Activity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
@Override
public void onBackPressed() {
super.onBackPressed();
this.finish();
System.exit(0);
}
}
我的xml代码:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Main" >
<!--
The primary full-screen view. This can be replaced with whatever view
is needed to present your content, e.g. VideoView, SurfaceView,
TextureView, etc.
-->
<!--
This FrameLayout insets its children based on system windows using
android:fitsSystemWindows.
-->
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" />
</FrameLayout>
没有更多的了。它很干净。