我從here下載了android demo新聞閱讀器項目,並使用Import> Existing Projects Into Workspace將其導入到eclipse中。 我還將android-support-v4.jar添加到構建路徑中,就像它說的那樣hereAndroid新聞閱讀器演示項目問題
我得到的問題與訪問資源有關。這裏是我得到的錯誤。
Description Resource Path Location Type
ReaderTutorial/src/com/example/android/newsreader line 143 Java Problem
android.app.ActionBar cannot be resolved to a variable NewsReaderActivity.java /NewsReaderTutorial/src/com/example/android/newsreader line 151 Java Problem
error: Error retrieving parent for item: No resource found that matches the given name 'android:style/Widget.Holo.Light.ActionBar.TabView'. style.xml /NewsReaderTutorial/res/values-v11 line 23 Android AAPT Problem
error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.NoActionBar'. style.xml /NewsReaderTutorial/res/values-v11 line 33 Android AAPT Problem
error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light'. style.xml /NewsReaderTutorial/res/values-v11 line 28 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:actionBarTabStyle'. style.xml /NewsReaderTutorial/res/values-v11 line 30 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:actionBarTabTextStyle'. style.xml /NewsReaderTutorial/res/values-v11 line 29 Android AAPT Problem
FragmentTransaction cannot be resolved to a type CompatActionBarNavHandler.java /NewsReaderTutorial/src/com/example/android/newsreader line 54 Java Problem
FragmentTransaction cannot be resolved to a type CompatActionBarNavHandler.java /NewsReaderTutorial/src/com/example/android/newsreader line 76 Java Problem
FragmentTransaction cannot be resolved to a type CompatActionBarNavHandler.java /NewsReaderTutorial/src/com/example/android/newsreader line 84 Java Problem
OnNavigationListener cannot be resolved to a type CompatActionBarNavHandler.java /NewsReaderTutorial/src/com/example/android/newsreader line 35 Java Problem
R cannot be resolved to a variable ArticleActivity.java /NewsReaderTutorial/src/com/example/android/newsreader line 51 Java Problem
R cannot be resolved to a variable HeadlinesFragment.java /NewsReaderTutorial/src/com/example/android/newsreader line 75 Java Problem
R cannot be resolved to a variable NewsReaderActivity.java /NewsReaderTutorial/src/com/example/android/newsreader line 76 Java Problem
R cannot be resolved to a variable NewsReaderActivity.java /NewsReaderTutorial/src/com/example/android/newsreader line 80 Java Problem
R cannot be resolved to a variable NewsReaderActivity.java /NewsReaderTutorial/src/com/example/android/newsreader line 82 Java Problem
R cannot be resolved to a variable NewsReaderActivity.java /NewsReaderTutorial/src/com/example/android/newsreader line 86 Java Problem
R cannot be resolved to a variable NewsReaderActivity.java /NewsReaderTutorial/src/com/example/android/newsreader line 101 Java Problem
R cannot be resolved to a variable NewsReaderActivity.java /NewsReaderTutorial/src/com/example/android/newsreader line 152 Java Problem
R cannot be resolved to a variable NewsReaderActivity.java /NewsReaderTutorial/src/com/example/android/newsreader line 183 Java Problem
Tab cannot be resolved to a type CompatActionBarNavHandler.java /NewsReaderTutorial/src/com/example/android/newsreader line 54 Java Problem
Tab cannot be resolved to a type CompatActionBarNavHandler.java /NewsReaderTutorial/src/com/example/android/newsreader line 76 Java Problem
Tab cannot be resolved to a type CompatActionBarNavHandler.java /NewsReaderTutorial/src/com/example/android/newsreader line 84 Java Problem
TabListener cannot be resolved to a type CompatActionBarNavHandler.java /NewsReaderTutorial/src/com/example/android/newsreader line 35 Java Problem
The import android.app.ActionBar cannot be resolved CompatActionBarNavHandler.java /NewsReaderTutorial/src/com/example/android/newsreader line 19 Java Problem
The import android.app.ActionBar cannot be resolved CompatActionBarNavHandler.java /NewsReaderTutorial/src/com/example/android/newsreader line 20 Java Problem
The import android.app.ActionBar cannot be resolved CompatActionBarNavHandler.java /NewsReaderTutorial/src/com/example/android/newsreader line 21 Java Problem
The import android.app.FragmentTransaction cannot be resolved CompatActionBarNavHandler.java /NewsReaderTutorial/src/com/example/android/newsreader line 22 Java Problem
The method getActionBar() is undefined for the type NewsReaderActivity NewsReaderActivity.java /NewsReaderTutorial/src/com/example/android/newsreader line 137 Java Problem
The method onNavigationItemSelected(int, long) of type CompatActionBarNavHandler must override or implement a supertype method CompatActionBarNavHandler.java /NewsReaderTutorial/src/com/example/android/newsreader line 65 Java Problem
我知道這是不是很多繼續下去,但我一直在尋找周圍,找不到任何東西作爲一個相當新的演示。
我認爲這可能是R.java文件沒有被生成,因爲我無法在我的gen目錄中找到它。我已經嘗試清理項目並重新啓動日食,但他們沒有工作。
任何幫助將是盛大的。
迪斯科
你的鏈接源項目正在爲我工作。 –