0

Android GCM サービスのコードを既存のコードに追加しましたが、それはそれ以前は完全に機能していました。次に、「Rを変数に解決できません」というエラーが見つかりました。プロジェクトをきれいにしてからビルドします。しかし、それはまだ機能していません。レイアウト ファイルまたはその他の xml ファイルに表示されるエラーはありません。

これを解決するためのアイデアを教えてください。

どうもありがとう。

4

3 に答える 3

1

What is the api level that you are supporting? If its below 8 then try to look into the menu xml and delete android:showasAction field. When R.java is not created its always some error in xml files. So also look into the androidmanifest file and styles xml. Basically search every xml for error according to your minimum api.

EDIT: Make sure you haven't imported android.R by any chance.If it is there delete it and then try all the answers till now.

于 2013-04-15T03:46:31.247 に答える
1

ソース フォルダーから R.java ファイルを削除します。今すぐあなたのプロジェクトをきれいにしてください

また、これを試してください。

プロジェクト名を右クリック>> Androidツール>>プロジェクトプロパティを修正

于 2013-04-15T04:45:06.413 に答える
1

これらを試してください

  1. プロジェクトを閉じ、Eclipse を終了し、Eclipse を再度開き、プロジェクトを消去します。
  2. [問題] タブで、すべてのエラーを選択して削除します。プロジェクトをもう一度クリーンアップします。
  3. ubuntu を使用している場合は、chmod 777 <project folder>
  4. ファイル エクスプローラーから bin フォルダーを削除します。

どちらが機能したか教えてください。

于 2013-04-15T03:50:45.720 に答える