1

私はAndroidゲームhttps://code.google.com/p/something-soft/に取り組んでおり、私のログキャットは、ゲームにインテントを起動しようとしていると言っていますが、メインスレッドが死んでいるようです( with および ActivityNotFoundException) が発生し、フリーズしたように見えます。

コード リポジトリで、最新の logcat 出力 (/trunk/KingLand/log.txt) とデバッガー出力 (/trunk/KingLnad/debug.txt) を含む /bin を除くすべてのファイルを送信しました。

私が実行しているエミュレーターは、2024MiB メモリを搭載した Android プラットフォーム 2.1-update1 であり、それが実際に問題を引き起こす可能性がある場合 (よくわかりません)

どんな支援も感謝されます。

編集: AndroidManifest.xml

$<?xml version="1.0" encoding="utf-8"?>
$  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
$        package="android.app"
$        android:versionCode="1"
$        android:versionName="1.0">
$        <application android:icon="@drawable/icon" android:label="@string/app_name">
$        <activity android:name="com.Something.Soft.KingsLand"
$                    android:label="@string/app_name">
$             <intent-filter>
$                   <action android:name="android.intent.action.MAIN" />
$                   <category android:name="android.intent.category.LAUNCHER" />
$             </intent-filter>
$        </activity>
$        <activity android:name=".Tutorial"
$              android:label="@string/tutorial"
$              android:theme="@android:style/Theme.Dialog"/>
$        <activity android:name=".Prefs"
$              android:label="@string/settingsTitle"/>
$        <activity android:name=".Game"     // this is the where the intent should fire to
$              android:label="@string/gameTitle"/>
$        </application>
$</manifest> 
4

2 に答える 2

1

アクティビティによってパッケージが異なります。「com.Something.Soft.」を想定しています。package はゲーム アクティビティが存在する場所です。 を に変更package="android.app"package="com.Something.Soft"ます。

または、アクティビティが定義されているフルネームを明示的に綴ることもできます。<activity android:name="com.Something.Soft.Game"

于 2011-04-18T20:27:04.440 に答える
1

package 属性は、アクティビティが配置されるパッケージである必要があります。

AndroidManifest.XML では、マニフェスト タグは属性 package で、アクティビティがあるパッケージを宣言する必要があります。

次のようになります。

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.Something.Soft"
    android:versionCode="1"
    android:versionName="1.0">
 //The others attributes.

あなたが定義した: "package="android.app"" そして、あなたのアクティビティは com.Something.Soft にあります

コード規則にも従う必要があります。パッケージ名はすべて小文字です。

于 2011-04-18T20:28:58.680 に答える