im just experimenting with Android + Java.
Im following this guide:
http://developer.android.com/training/basics/firstapp/index.html
Did everything just as it is. I’ve only changed “DisplayMessageActivity” class name to ” DisplayMsgActivity”
I’ve updated the manifest, and all references to this class, but Im still getting 2 errors:
-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
BUILD FAILED
/home/juanchi/android-sdks/tools/ant/build.xml:680: The following error occurred while executing this line:
/home/juanchi/android-sdks/tools/ant/build.xml:693: Compile failed; see the compiler error output for details.
Total time: 5 seconds
Any ideas?
Everyone uses eclipse for learning and development. Just create projects in eclipse. You can import the source into your eclipse project and go from there. I would start with basic project inside eclipse not outside. Its way more frustrating to work outside eclipse. There are many other reasons to use eclipse, like good view of logcat, debugging etc.