MDict Android compile错误
我到bitbucket下载了MDict Android的源码并使用IntelliJ IDEA 12 Community Edition打开。我没有对源码做出任何修改,但当我尝试run或debug时却出现以下的错误讯息:Information:Using javac 1.7.0_25 to compile java sourcesInformation:java: Errors occurred while compiling module 'library'
Information:Compilation completed with 13 errors and 0 warnings in 7 sec
Information:13 errors
Information:0 warnings
C:\Users\Downloads\mdict_source\raymanzhang-mdict-android-opensource-e278ebbc7541\library\actionbar-sherlock\library\test\com\actionbarsherlock\internal\ManifestParsingTest.java
Error:Error:line (3)java: package org.junit does not exist
Error:Error:line (6)java: package org.hamcrest does not exist
Error:Error:line (6)java: static import only from classes and interfaces
Error:Error:line (7)java: package org.junit does not exist
Error:Error:line (7)java: static import only from classes and interfaces
Error:Error:line (10)java: cannot find symbol
symbol: class Test
location: class com.actionbarsherlock.internal.ManifestParsingTest
Error:Error:line (17)java: cannot find symbol
symbol: class Test
location: class com.actionbarsherlock.internal.ManifestParsingTest
Error:Error:line (24)java: cannot find symbol
symbol: class Test
location: class com.actionbarsherlock.internal.ManifestParsingTest
Error:Error:line (31)java: cannot find symbol
symbol: class Test
location: class com.actionbarsherlock.internal.ManifestParsingTest
Error:Error:line (14)java: cannot find symbol
symbol: method equalTo(java.lang.String)
location: class com.actionbarsherlock.internal.ManifestParsingTest
Error:Error:line (21)java: cannot find symbol
symbol: method equalTo(java.lang.String)
location: class com.actionbarsherlock.internal.ManifestParsingTest
Error:Error:line (28)java: cannot find symbol
symbol: method equalTo(java.lang.String)
location: class com.actionbarsherlock.internal.ManifestParsingTest
Error:Error:line (35)java: cannot find symbol
symbol: method equalTo(java.lang.String)
location: class com.actionbarsherlock.internal.ManifestParsingTest请问问题是出现在哪里呢?我是Android程序开发菜鸟,请多多指教。 R大说是要用android stdio编译 可是在 bitbucket.org/raymanzhang/mdict-android-opensource 网站上说明:You need IntelliJ IDEA to open and build the project.
Android Studio是根据IntelliJ IDEA,而且现在它的正式版也还没有发布。 没有人懂吗?到底要怎样才能正确编译? 检查一下你有没有下载安装Android4.0.3的SDK 检查一下你有没有下载安装Android4.0.3的SDK
glacierlee 发表于 2013-6-30 17:06 https://pdawiki.com/forum/images/common/back.gif
Java 和 Android 的 SDK 都有。不过根据 log,视乎我没有一些package。应该到哪里获取它们? Error:Error:line (3)java: package org.junit does not exist
Error:Error:line (6)java: package org.hamcrest does not exist
Error:Error:line (6)java: static import only from classes and interfaces
Error:Error:line (7)java: package org.junit does not exist
Error:Error:line (7)java: static import only from classes and interfaces
Error:Error:line (10)java: cannot find symbol 我自己现在都是在用Andriod Studio进行开发,可以直接打开现在的项目进行开发的。看样子像是ActionbarSherlock那个模块里一些test代码被加到的项目里了。你可以去掉的。 我自己现在都是在用Andriod Studio进行开发,可以直接打开现在的项目进行开发的。看样子像是ActionbarSherlock那个模块里一些test代码被加到的项目里了。你可以去掉的。
rayman 发表于 2013-7-1 11:58 https://pdawiki.com/forum/images/common/back.gif
Rayman大大终于出现了!
这次我使用Android Studio,同时我把actionbarsherlock的整个test删除了,但却得到这个错误讯息:Information:Compilation completed with 100 errors and 17 warnings in 4 sec
Information:100 errors
Information:17 warnings
C:\Users\Downloads\mdict_source\raymanzhang-mdict-studio\library\actionbar-sherlock\actionbarsherlock-fest\src\main\java\org\fest\assertions\api\com\actionbarsherlock\view\MenuAssert.java
Error:Error:line (4)error: cannot find symbol class AbstractAssert
Error:Error:line (5)error: cannot find symbol class Assertions
Error:Error:line (7)error: cannot find symbol class Assertions
Error:Error:line (7)error: static import only from classes and interfaces
Error:Error:line (10)error: cannot find symbol class AbstractAssert
Error:Error:line (16)error: cannot find symbol method isNotNull()
Error:Error:line (17)error: cannot find symbol variable actual
Error:Error:line (24)error: cannot find symbol method isNotNull()
Error:Error:line (25)error: cannot find symbol variable actual
Error:Error:line (32)error: cannot find symbol method isNotNull()
Error:Error:line (33)error: cannot find symbol variable actual
Error:Error:line (33)error: cannot find symbol variable Assertions
Error:Error:line (40)error: cannot find symbol method isNotNull()
Error:Error:line (41)error: cannot find symbol variable actual
Error:Error:line (41)error: cannot find symbol variable Assertions
Error:Error:line (48)error: cannot find symbol method isNotNull()
Error:Error:line (49)error: cannot find symbol variable actual
Error:Error:line (50)error: cannot find symbol variable Assertions
C:\Users\Downloads\mdict_source\raymanzhang-mdict-studio\library\actionbar-sherlock\actionbarsherlock-fest\src\main\java\org\fest\assertions\api\com\actionbarsherlock\view\MenuItemAssert.java
Error:Error:line (7)error: cannot find symbol class AbstractAssert
Error:Error:line (9)error: cannot find symbol class Assertions
Error:Error:line (9)error: static import only from classes and interfaces
Error:Error:line (12)error: cannot find symbol class AbstractAssert
Error:Error:line (18)error: cannot find symbol method isNotNull()
Error:Error:line (19)error: cannot find symbol variable actual
Error:Error:line (20)error: cannot find symbol method assertThat(View)
Error:Error:line (27)error: cannot find symbol method isNotNull()
Error:Error:line (28)error: cannot find symbol variable actual
Error:Error:line (29)error: cannot find symbol method assertThat(char)
Error:Error:line (37)error: cannot find symbol method isNotNull()
Error:Error:line (38)error: cannot find symbol variable actual
Error:Error:line (39)error: cannot find symbol method assertThat(int)
Error:Error:line (46)error: cannot find symbol method isNotNull()
Error:Error:line (47)error: cannot find symbol variable actual
Error:Error:line (48)error: cannot find symbol method assertThat(Drawable)
Error:Error:line (55)error: cannot find symbol method isNotNull()
Error:Error:line (56)error: cannot find symbol variable actual
Error:Error:line (57)error: cannot find symbol method assertThat(Intent)
Error:Error:line (64)error: cannot find symbol method isNotNull()
Error:Error:line (65)error: cannot find symbol variable actual
Error:Error:line (66)error: cannot find symbol method assertThat(int)
Error:Error:line (73)error: cannot find symbol method isNotNull()
Error:Error:line (74)error: cannot find symbol variable actual
Error:Error:line (75)error: cannot find symbol method assertThat(char)
Error:Error:line (83)error: cannot find symbol method isNotNull()
Error:Error:line (84)error: cannot find symbol variable actual
Error:Error:line (85)error: cannot find symbol method assertThat(int)
Error:Error:line (92)error: cannot find symbol method isNotNull()
Error:Error:line (93)error: cannot find symbol variable actual
Error:Error:line (94)error: cannot find symbol method assertThat(CharSequence)
Error:Error:line (101)error: cannot find symbol method isNotNull()
Error:Error:line (102)error: cannot find symbol variable actual
Error:Error:line (103)error: cannot find symbol method assertThat(CharSequence)
Error:Error:line (111)error: cannot find symbol method isNotNull()
Error:Error:line (112)error: cannot find symbol variable actual
Error:Error:line (119)error: cannot find symbol method isNotNull()
Error:Error:line (120)error: cannot find symbol variable actual
Error:Error:line (127)error: cannot find symbol method isNotNull()
Error:Error:line (128)error: cannot find symbol variable actual
Error:Error:line (135)error: cannot find symbol method isNotNull()
Error:Error:line (136)error: cannot find symbol variable actual
Error:Error:line (143)error: cannot find symbol method isNotNull()
Error:Error:line (144)error: cannot find symbol variable actual
Error:Error:line (151)error: cannot find symbol method isNotNull()
Error:Error:line (152)error: cannot find symbol variable actual
Error:Error:line (159)error: cannot find symbol method isNotNull()
Error:Error:line (160)error: cannot find symbol variable actual
Error:Error:line (167)error: cannot find symbol method isNotNull()
Error:Error:line (168)error: cannot find symbol variable actual
Error:Error:line (175)error: cannot find symbol method isNotNull()
Error:Error:line (176)error: cannot find symbol variable actual
Error:Error:line (183)error: cannot find symbol method isNotNull()
Error:Error:line (184)error: cannot find symbol variable actual
Error:Error:line (191)error: cannot find symbol method isNotNull()
Error:Error:line (192)error: cannot find symbol variable actual
Error:Error:line (199)error: cannot find symbol method isNotNull()
Error:Error:line (200)error: cannot find symbol variable actual
C:\Users\Downloads\mdict_source\raymanzhang-mdict-studio\library\actionbar-sherlock\actionbarsherlock-fest\src\main\java\org\fest\assertions\api\com\actionbarsherlock\app\ActionBarAssert.java
Error:Error:line (4)error: package org.fest.assertions.api.android does not exist
Error:Error:line (7)error: cannot find symbol class AbstractAssert
Error:Error:line (17)error: cannot find symbol class Assertions
Error:Error:line (17)error: static import only from classes and interfaces
Error:Error:line (20)error: cannot find symbol class AbstractAssert
Error:Error:line (26)error: cannot find symbol method isNotNull()
Error:Error:line (27)error: cannot find symbol variable actual
Error:Error:line (28)error: cannot find symbol method assertThat(int)
Error:Error:line (36)error: cannot find symbol method isNotNull()
Error:Error:line (37)error: cannot find symbol variable actual
Error:Error:line (38)error: cannot find symbol method assertThat(int)
Error:Error:line (45)error: cannot find symbol method isNotNull()
Error:Error:line (46)error: cannot find symbol variable actual
Error:Error:line (47)error: cannot find symbol method assertThat(int)
Error:Error:line (54)error: cannot find symbol method isNotNull()
Error:Error:line (55)error: cannot find symbol variable actual
Error:Error:line (56)error: cannot find symbol method assertThat(int)
Error:Error:line (64)error: cannot find symbol method isNotNull()
Error:Error:line (65)error: cannot find symbol variable actual
Error:Error:line (66)error: cannot find symbol method assertThat(int)
C:\Users\Downloads\mdict_source\raymanzhang-mdict-studio\library\actionbar-sherlock\actionbarsherlock-fest\src\main\java\org\fest\assertions\api\com\actionbarsherlock\view\ActionModeAssert.java
Error:Error:line (5)error: cannot find symbol class AbstractAssert
Error:Error:line (7)error: cannot find symbol class Assertions
Error:Error:line (7)error: static import only from classes and interfaces
Error:Error:line (10)error: cannot find symbol class AbstractAssert
C:\Users\Downloads\mdict_source\raymanzhang-mdict-studio\library\actionbar-sherlock\actionbarsherlock\src\com\actionbarsherlock\internal\widget\ActionBarContextView.java
Warning:Warning:line (81) setBackgroundDrawable(Drawable) in View has been deprecated
Warning:Warning:line (115) setBackgroundDrawable(Drawable) in View has been deprecated
Warning:Warning:line (129) setBackgroundDrawable(Drawable) in View has been deprecated
Warning:Warning:line (231) setBackgroundDrawable(Drawable) in View has been deprecated
Warning:Warning:line (244) setBackgroundDrawable(Drawable) in View has been deprecated
C:\Users\Downloads\mdict_source\raymanzhang-mdict-studio\library\actionbar-sherlock\actionbarsherlock\src\com\actionbarsherlock\internal\view\menu\MenuPopupHelper.java
Warning:Warning:line (145) removeGlobalOnLayoutListener(OnGlobalLayoutListener) in ViewTreeObserver has been deprecated
Warning:Warning:line (216) removeGlobalOnLayoutListener(OnGlobalLayoutListener) in ViewTreeObserver has been deprecated
C:\Users\Downloads\mdict_source\raymanzhang-mdict-studio\library\actionbar-sherlock\actionbarsherlock\src\com\actionbarsherlock\internal\widget\ActionBarContainer.java
Warning:Warning:line (56) setBackgroundDrawable(Drawable) in View has been deprecated
C:\Users\Downloads\mdict_source\raymanzhang-mdict-studio\library\actionbar-sherlock\actionbarsherlock\src\com\actionbarsherlock\app\ActionBar.java
Warning:Warning:line (943) FILL_PARENT in LayoutParams has been deprecated
C:\Users\Downloads\mdict_source\raymanzhang-mdict-studio\library\actionbar-sherlock\actionbarsherlock\src\com\actionbarsherlock\internal\widget\ScrollingTabContainerView.java
Warning:Warning:line (280) setBackgroundDrawable(Drawable) in View has been deprecated
C:\Users\Downloads\mdict_source\raymanzhang-mdict-studio\library\actionbar-sherlock\actionbarsherlock\src\com\actionbarsherlock\internal\widget\IcsProgressBar.java
Warning:Warning:line (207) animationResolution in attr has been deprecated
C:\Users\Downloads\mdict_source\raymanzhang-mdict-studio\library\actionbar-sherlock\actionbarsherlock\src\com\actionbarsherlock\widget\ActivityChooserView.java
Warning:Warning:line (378) removeGlobalOnLayoutListener(OnGlobalLayoutListener) in ViewTreeObserver has been deprecated
Warning:Warning:line (420) removeGlobalOnLayoutListener(OnGlobalLayoutListener) in ViewTreeObserver has been deprecated
Warning:Warning:line (537) setBackgroundDrawable(Drawable) in View has been deprecated
Warning:Warning:line (539) setBackgroundDrawable(Drawable) in View has been deprecated
C:\Users\Downloads\mdict_source\raymanzhang-mdict-studio\library\actionbar-sherlock\actionbarsherlock\src\com\actionbarsherlock\internal\view\menu\ListMenuItemView.java
Warning:Warning:line (86) setBackgroundDrawable(Drawable) in View has been deprecated
C:\Users\Downloads\mdict_source\raymanzhang-mdict-studio\library\actionbar-sherlock\actionbarsherlock\src\com\actionbarsherlock\internal\view\ActionProviderWrapper.java
Warning:Warning:line (22) onCreateActionView() in ActionProvider has been deprecated 不用删掉文件,只是在模块设置里把test目录从源代码目录中删掉。 不用删掉文件,只是在模块设置里把test目录从源代码目录中删掉。
rayman 发表于 2013-7-1 15:42 https://pdawiki.com/forum/images/common/back.gif
抱歉,我这个菜鸟不明白。可不可以请你告诉我详细的步骤? Project Setting->Modules->ActionbarSherlock->Source Project Setting->Modules->ActionbarSherlock->Source
rayman 发表于 2013-7-2 22:34 https://pdawiki.com/forum/images/common/back.gif
Project setting是到.idea > modules.xml对吗?
这是它的source,但我没有看到test。<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock/actionbarsherlock.iml" filepath="$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock/actionbarsherlock.iml" />
<module fileurl="file://$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock-samples/demos/demos.iml" filepath="$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock-samples/demos/demos.iml" />
<module fileurl="file://$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock-samples/fragments/fragments.iml" filepath="$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock-samples/fragments/fragments.iml" />
<module fileurl="file://$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock-samples/known-bugs/known-bugs.iml" filepath="$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock-samples/known-bugs/known-bugs.iml" />
<module fileurl="file://$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock-fest/src/main/main.iml" filepath="$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock-fest/src/main/main.iml" />
<module fileurl="file://$PROJECT_DIR$/raymanzhang-mdict.iml" filepath="$PROJECT_DIR$/raymanzhang-mdict.iml" />
<module fileurl="file://$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock-samples/roboguice/roboguice.iml" filepath="$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock-samples/roboguice/roboguice.iml" />
<module fileurl="file://$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock-samples/styled/styled.iml" filepath="$PROJECT_DIR$/library/actionbar-sherlock/actionbarsherlock-samples/styled/styled.iml" />
</modules>
</component>
</project> 不知道的项目里为什么生成那么多的无用内容,只需要library/actionbar-sherlock/actionbarsherlock目录下这个模块即可。另外我的项目文件里原本有对应的模块的项目设置的。 真不好意思,我还是不知道该怎么做。算了吧,我暂时把它放在一边。让我学了更深入的Android编程后才到回来。
谢谢Rayman.
页:
[1]