即時通訊只是試驗Android + Java。第一個Android項目構建錯誤
林按照本指南: http://developer.android.com/training/basics/firstapp/index.html
所做的一切只是因爲它是。我只是改變了「DisplayMessageActivity」類名「DisplayMsgActivity」 我已經更新清單,併爲該類的所有引用,但是我仍然得到2個錯誤:
-compile:
[javac] Compiling 4 source files to /home/juanchi/Dropbox/Dev/ArrayAppProject/bin/classes
[javac] /home/juanchi/Dropbox/Dev/ArrayAppProject/src/com/jnix/arrayapp/DisplayMsgActivity.java:7: duplicate class: DisplayMsgActivity
[javac] public class DisplayMsgActivity extends Activity {
[javac] ^
[javac] /home/juanchi/Dropbox/Dev/ArrayAppProject/src/com/jnix/arrayapp/ArrayAppActivity.java:20: cannot access com.jnix.arrayapp.DisplayMsgActivity
[javac] bad class file: RegularFileObject[/home/juanchi/Dropbox/Dev/ArrayAppProject/src/com/jnix/arrayapp/DisplayMsgActivity.java]
[javac] file does not contain class com.jnix.arrayapp.DisplayMsgActivity
[javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
[javac] Intent intent = new Intent(this, DisplayMsgActivity.class);
[javac] ^
[javac] 2 errors
構建失敗 /家/ juanchi /android-sdks/tools/ant/build.xml:680:執行此行時發生以下錯誤: /home/juanchi/android-sdks/tools/ant/build.xml:693:編譯失敗;詳細信息請參閱編譯器錯誤輸出。
總時間:5秒
任何想法?
請上傳您的類文件的地方在那裏我們可以查看它。 :) – ninetwozero 2012-07-13 23:49:11
您是不是在ADT中使用Eclipse?嘗試重新創建你的構建文件:android create project --target 8 --name「MyFirstProject」--path/path/to/project --activity StartingActivity --package net.sample.package。然後用ant,「ant debug」來構建。 – 2012-07-13 23:56:40
http://pastebin.com/GCkQqL7b這裏是* java和清單文件 – JuanCB 2012-07-14 00:11:16