0

こんばんは!Eclipse を更新したところ、完了したら、ほぼすべてのコード行がエラーとしてマークされます。この解決策を見つけました(これは問題の一部だと思います)が、それでもすべてのエラーが発生します。

Android API 18 をインストールし、LVL をインストールして、いくつかのパッケージを更新しました。

            Description Resource    Path    Location    Type
    color cannot be resolved to a variable  AmountEdit.java /Spendo2/src/com/SverkerSbrg/Spendo/Transaction/TransactionEdit line 77 Java Problem
    PagerAdapter cannot be resolved to a type   SpendoFull.java /SpendoFull/src/com/SverkerSbrg/SpendoFull  line 44 Java Problem
    PagerAdapter cannot be resolved to a type   SpendoFull.java /SpendoFull/src/com/SverkerSbrg/SpendoFull  line 43 Java Problem
    PagerAdapter cannot be resolved to a type   SpendoLite.java /SpendoLite/src/com/SverkerSbrg/SpendoLite  line 43 Java Problem
    PagerAdapter cannot be resolved to a type   SpendoLite.java /SpendoLite/src/com/SverkerSbrg/SpendoLite  line 44 Java Problem
    R cannot be resolved to a variable  Amount.java /Spendo2/src/com/SverkerSbrg/Spendo/Transaction/Datastructure/Amount    line 41 Java Problem
    R cannot be resolved to a variable  AmountEdit.java /Spendo2/src/com/SverkerSbrg/Spendo/Transaction/TransactionEdit line 50 Java Problem
    R cannot be resolved to a variable  AmountEdit.java /Spendo2/src/com/SverkerSbrg/Spendo/Transaction/TransactionEdit line 45 Java Problem
    R cannot be resolved to a variable  AmountEdit.java /Spendo2/src/com/SverkerSbrg/Spendo/Transaction/TransactionEdit line 55 Java Problem
    R cannot be resolved to a variable  AmountEdit.java /Spendo2/src/com/SverkerSbrg/Spendo/Transaction/TransactionEdit line 52 Java Problem
    FragmentActivity cannot be resolved to a type   SpendoLite.java /SpendoLite/src/com/SverkerSbrg/SpendoLite  line 38 Java Problem
    R cannot be resolved to a variable  About.java  /Spendo2/src/com/SverkerSbrg/Spendo/MiscTab line 53 Java Problem
    R cannot be resolved to a variable  About.java  /Spendo2/src/com/SverkerSbrg/Spendo/MiscTab line 49 Java Problem
    PagerAdapter cannot be resolved to a type   SpendoFull.java /SpendoFull/src/com/SverkerSbrg/SpendoFull  line 24 Java Problem
    R cannot be resolved to a variable  About.java  /Spendo2/src/com/SverkerSbrg/Spendo/MiscTab line 44 Java Problem
    R cannot be resolved to a variable  About.java  /Spendo2/src/com/SverkerSbrg/Spendo/MiscTab line 39 Java Problem
    R cannot be resolved to a variable  About.java  /Spendo2/src/com/SverkerSbrg/Spendo/MiscTab line 34 Java Problem
    FragmentActivity cannot be resolved to a type   SpendoFull.java /SpendoFull/src/com/SverkerSbrg/SpendoFull  line 22 Java Problem
    R cannot be resolved to a variable  About.java  /Spendo2/src/com/SverkerSbrg/Spendo/MiscTab line 30 Java Problem
    R cannot be resolved to a variable  About.java  /Spendo2/src/com/SverkerSbrg/Spendo/MiscTab line 26 Java Problem
    R cannot be resolved to a variable  About.java  /Spendo2/src/com/SverkerSbrg/Spendo/MiscTab line 22 Java Problem
    FragmentActivity cannot be resolved to a type   SpendoFull.java /SpendoFull/src/com/SverkerSbrg/SpendoFull  line 38 Java Problem
    R cannot be resolved to a variable  About.java  /Spendo2/src/com/SverkerSbrg/Spendo/MiscTab line 53 Java Problem
    R cannot be resolved to a variable  About.java  /Spendo2/src/com/SverkerSbrg/Spendo/MiscTab line 53 Java Problem
    R cannot be resolved to a variable  About.java  /Spendo2/src/com/SverkerSbrg/Spendo/MiscTab line 53 Java Problem
    FragmentStatePagerAdapter cannot be resolved to a type  SpendoFull.java /SpendoFull/src/com/SverkerSbrg/SpendoFull  line 67 Java Problem
    FragmentManager cannot be resolved to a type    SpendoFull.java /SpendoFull/src/com/SverkerSbrg/SpendoFull  line 68 Java Problem
    Fragment cannot be resolved to a type   SpendoLite.java /SpendoLite/src/com/SverkerSbrg/SpendoLite  line 73 Java Problem
    FragmentManager cannot be resolved to a type    SpendoLite.java /SpendoLite/src/com/SverkerSbrg/SpendoLite  line 68 Java Problem
    Fragment cannot be resolved to a type   SpendoFull.java /SpendoFull/src/com/SverkerSbrg/SpendoFull  line 73 Java Problem
    FragmentStatePagerAdapter cannot be resolved to a type  SpendoLite.java /SpendoLite/src/com/SverkerSbrg/SpendoLite  line 67 Java Problem
    FragmentActivity cannot be resolved to a type   SpendoLite.java /SpendoLite/src/com/SverkerSbrg/SpendoLite  line 61 Java Problem
    MiscTabFragment cannot be resolved to a type    SpendoFull.java /SpendoFull/src/com/SverkerSbrg/SpendoFull  line 84 Java Problem
    PTHandler cannot be resolved    SpendoLite.java /SpendoLite/src/com/SverkerSbrg/SpendoLite  line 56 Java Problem
    FragmentActivity cannot be resolved to a type   SpendoLite.java /SpendoLite/src/com/SverkerSbrg/SpendoLite  line 22 Java Problem
    PagerAdapter cannot be resolved to a type   SpendoLite.java /SpendoLite/src/com/SverkerSbrg/SpendoLite  line 24 Java Problem
    FragmentActivity cannot be resolved to a type   SpendoFull.java /SpendoFull/src/com/SverkerSbrg/SpendoFull  line 61 Java Problem
    MiscTabFragment cannot be resolved to a type    SpendoLite.java /SpendoLite/src/com/SverkerSbrg/SpendoLite  line 84 Java Problem
    PTHandler cannot be resolved    SpendoFull.java /SpendoFull/src/com/SverkerSbrg/SpendoFull  line 56 Java Problem

この問題は、Eclipse のすべてのプロジェクトに影響します。クリーンアップと再起動を数回試みました (デスクトップ自体を含む)。

更新: いわゆるライブラリ プロジェクトに主な問題が 1 つあると思います。問題が持続する場所 (633 回)

Description Resource    Path    Location    Type
R cannot be resolved to a variable  CategoryEdit.java   /Spendo2/src/com/SverkerSbrg/Spendo/Category    line 98 Java Problem
4

1 に答える 1

0

これはごく普通のことです。そして、多くの理由で起こる可能性があります。

Rがコード内のエラーであるため、Rが生成されていないなど、エラーが発生することがあります。また、R からのリソースの参照が見つからないため、エラーはコードにあります。

R ファイルを再作成してみてください。通常、プロジェクト -> このためにクリーンな作業を行います。

複数のプロジェクトがある場合は、すべて削除してから、1 つずつ追加してみてください。最初のものを追加し、それが問題なければコンパイルしてから、次のプロジェクトを追加します。

複数のプロジェクトで、いくつかの依存関係ファイルが複数回追加されたことがあります。Android ライブラリが Android ライブラリとして Android ビルド パスに追加されていることを確認してください。また、Java ライブラリは Java Build パスにあります。ライブラリまたはサポート jar が複数回表示される場合は、それを削除してください。

Eclipse のプロパティで、Android のプロパティ -> Android isLibrary Java のプロパティ ->java ビルド パス

于 2013-09-26T22:21:52.950 に答える