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 中的所有项目。我尝试过多次清理和重新启动(包括桌面本身)。

更新:我认为我在所谓的图书馆项目中有一个主要问题。问题持续存在的地方(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 文件。通常项目 - >为此清理工作。

当您有多个项目时,请删除所有项目,然后尝试一一添加。添加第一个,编译如果那个没问题,然后添加下一个项目。

有时有多个项目,一些依赖文件添加了多次。确保将 Android 库添加为 Android 构建路径上的 Android 库。而且,Java 库位于 Java 构建路径上。如果您多次看到任何库或支持 jar,请将其删除。

在 Eclipse 属性上,Android Properties -> Android isLibrary Java Properties->java Build Path

于 2013-09-26T22:21:52.950 回答