Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to duplicate an SDK-sample project into workspace?
    primarykey
    data
    text
    <p>My goal is to duplicate the NotePad sample project such that if I tinker with the source files in order to learn through experimentation, the original sample files will <strong>not</strong> be affected. The rational behind this goal is explained very well in bullets 1-2-3 in <a href="https://stackoverflow.com/questions/2951068/how-to-start-an-android-project-with-downloaded-sample-code/3373804#3373804">this post</a> by @Neutrino.</p> <p>Based on @Neutrino's post, I performed the following steps:</p> <p>Step 1: Copy sample code to a temporary location (outside of the workspace directory):</p> <pre><code> 1. Close Eclipse. 2. Copy the entire sample folder **NotePad** from C:\android-sdk-windows\samples\android-7 to C:\Users\androideve\Documents\NotePad </code></pre> <p>Step 2. Import from copy to workspace:</p> <pre><code> 1. Start Eclipse 2. File &gt; New &gt; Project &gt; Android Project [Next] &gt; Create project from existing **source**: C:\Users\androideve\Documents\NotePad 3. Delete project from Package Explorer (without deleting its files from disk!) 4. File &gt; Import... &gt; General &gt; Existing Projects into Workspace [Next] &gt; Browse: C:\Users\androideve\Documents\NotePad &gt; Check "Copy projects into workspace" [Finish] 5. Delete entire folder C:\Users\androideve\Documents\NotePad from disk. </code></pre> <p>This results in the project creation but it comes with 21 errors without any clue as to what causes them (remember, I am an Android newbie and I didn't write the NotePad program):</p> <pre><code>Description Resource Path Location Type Error generating final archive: java.io.FileNotFoundException: C:\sb\workspace\NotesList\bin\resources.ap_ does not exist NotesList Unknown Android Packaging Problem error: Error: String types not allowed (at 'layout_height' with value 'match_parent'). note_editor.xml /NotesList/res/layout line 17 Android AAPT Problem error: Error: String types not allowed (at 'layout_width' with value 'match_parent'). note_editor.xml /NotesList/res/layout line 17 Android AAPT Problem error: Error: String types not allowed (at 'layout_width' with value 'match_parent'). noteslist_item.xml /NotesList/res/layout line 17 Android AAPT Problem R cannot be resolved to a variable NoteEditor.java /NotesList/src/com/example/android/notepad line 148 Java Problem R cannot be resolved to a variable NoteEditor.java /NotesList/src/com/example/android/notepad line 151 Java Problem R cannot be resolved to a variable NoteEditor.java /NotesList/src/com/example/android/notepad line 175 Java Problem R cannot be resolved to a variable NoteEditor.java /NotesList/src/com/example/android/notepad line 177 Java Problem R cannot be resolved to a variable NoteEditor.java /NotesList/src/com/example/android/notepad line 194 Java Problem R cannot be resolved to a variable NoteEditor.java /NotesList/src/com/example/android/notepad line 195 Java Problem R cannot be resolved to a variable NoteEditor.java /NotesList/src/com/example/android/notepad line 265 Java Problem R cannot be resolved to a variable NoteEditor.java /NotesList/src/com/example/android/notepad line 269 Java Problem R cannot be resolved to a variable NoteEditor.java /NotesList/src/com/example/android/notepad line 276 Java Problem R cannot be resolved to a variable NotesList.java /NotesList/src/com/example/android/notepad line 83 Java Problem R cannot be resolved to a variable NotesList.java /NotesList/src/com/example/android/notepad line 94 Java Problem R cannot be resolved to a variable NotesList.java /NotesList/src/com/example/android/notepad line 177 Java Problem R cannot be resolved to a variable NotesLiveFolder.java /NotesList/src/com/example/android/notepad line 48 Java Problem R cannot be resolved to a variable NotesLiveFolder.java /NotesList/src/com/example/android/notepad line 51 Java Problem R cannot be resolved to a variable TitleEditor.java /NotesList/src/com/example/android/notepad line 71 Java Problem R cannot be resolved to a variable TitleEditor.java /NotesList/src/com/example/android/notepad line 80 Java Problem R cannot be resolved to a variable TitleEditor.java /NotesList/src/com/example/android/notepad line 83 Java Problem </code></pre> <p>What did I do wrong and what do I need to make the <strong>copy</strong> of this NotePad sample build and run?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload