Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well, it took me about forever to fully understand this error to work around it, and also to enable debugging from Eclipse shortcut. </p> <p>So without any guarantees here is a general solution, which so far works for me very nicely, and I didn't encounter any problems so far:</p> <p>I have a parent pom:</p> <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;com.nu.art.software.android&lt;/groupId&gt; &lt;artifactId&gt;android-maven-parent&lt;/artifactId&gt; &lt;version&gt;1.0.0&lt;/version&gt; &lt;packaging&gt;pom&lt;/packaging&gt; &lt;name&gt;android-maven-parent&lt;/name&gt; &lt;url&gt;http://maven.apache.org&lt;/url&gt; &lt;properties&gt; &lt;android.sdk&gt;7&lt;/android.sdk&gt; &lt;android.emulator.name&gt;emulator1&lt;/android.emulator.name&gt; &lt;android.version&gt;2.1_r1&lt;/android.version&gt; &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt; &lt;/properties&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.android&lt;/groupId&gt; &lt;artifactId&gt;android&lt;/artifactId&gt; &lt;version&gt;${android.version}&lt;/version&gt; &lt;type&gt;jar&lt;/type&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt; &lt;outputDirectory&gt;./target/android-classes&lt;/outputDirectory&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;com.jayway.maven.plugins.android.generation2&lt;/groupId&gt; &lt;artifactId&gt;maven-android-plugin&lt;/artifactId&gt; &lt;version&gt;3.0.0-alpha-2&lt;/version&gt; &lt;configuration&gt; &lt;sdk&gt; &lt;platform&gt;${android.sdk}&lt;/platform&gt; &lt;/sdk&gt; &lt;emulator&gt; &lt;avd&gt;${android.emulator.name}&lt;/avd&gt; &lt;/emulator&gt; &lt;deleteConflictingFiles&gt;true&lt;/deleteConflictingFiles&gt; &lt;undeployBeforeDeploy&gt;true&lt;/undeployBeforeDeploy&gt; &lt;/configuration&gt; &lt;extensions&gt;true&lt;/extensions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;version&gt;2.3.2&lt;/version&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt; &lt;version&gt;2.3&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;unpack&lt;/id&gt; &lt;phase&gt;generate-sources&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;unpack-dependencies&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;excludeScope&gt;provided&lt;/excludeScope&gt; &lt;skip&gt;true&lt;/skip&gt; &lt;includes&gt;**/*.class&lt;/includes&gt; &lt;outputDirectory&gt;${project.basedir}/bin&lt;/outputDirectory&gt; &lt;overWriteReleases&gt;true&lt;/overWriteReleases&gt; &lt;overWriteSnapshots&gt;true&lt;/overWriteSnapshots&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt; &lt;version&gt;1.3&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;Make-classes-output&lt;/id&gt; &lt;phase&gt;clean&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;run&lt;/goal&gt; &lt;/goals&gt; &lt;inherited&gt;true&lt;/inherited&gt; &lt;configuration&gt; &lt;tasks&gt; &lt;echo&gt;Creating '${project.basedir}/target/classes' Directory&lt;/echo&gt; &lt;mkdir dir="${project.basedir}/target/classes" /&gt; &lt;/tasks&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre> <p>Which does all the logic missing in the plugin to enable the launching and debugging from Eclipse, plus solves my duplicates issues. (<strong>The first time I had the res folder, as source folder, which messed things up, and later it was duplicates within the dependencies</strong>)</p> <p>Next each final project has its own pom of course, which enables the dependency copy to the Eclipse output folder:</p> <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt; &lt;parent&gt; &lt;artifactId&gt;android-maven-parent&lt;/artifactId&gt; &lt;groupId&gt;com.nu.art.software.android&lt;/groupId&gt; &lt;version&gt;1.0.0&lt;/version&gt; &lt;/parent&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;com.nu.art.software.sod&lt;/groupId&gt; &lt;artifactId&gt;s-o-d&lt;/artifactId&gt; &lt;version&gt;1.0.0&lt;/version&gt; &lt;packaging&gt;apk&lt;/packaging&gt; &lt;name&gt;S-O-D&lt;/name&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;com.nu.art.software&lt;/groupId&gt; &lt;artifactId&gt;rexml&lt;/artifactId&gt; &lt;version&gt;0.0.1&lt;/version&gt; &lt;type&gt;jar&lt;/type&gt; &lt;scope&gt;compile&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.nu.art.software&lt;/groupId&gt; &lt;artifactId&gt;nu-art-module-manager&lt;/artifactId&gt; &lt;version&gt;0.0.1&lt;/version&gt; &lt;type&gt;jar&lt;/type&gt; &lt;scope&gt;compile&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.nu.art.software&lt;/groupId&gt; &lt;artifactId&gt;nu-art-generator&lt;/artifactId&gt; &lt;version&gt;0.0.1&lt;/version&gt; &lt;type&gt;jar&lt;/type&gt; &lt;scope&gt;compile&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.nu.art.software&lt;/groupId&gt; &lt;artifactId&gt;nu-art-reflection&lt;/artifactId&gt; &lt;version&gt;0.0.1&lt;/version&gt; &lt;type&gt;jar&lt;/type&gt; &lt;scope&gt;compile&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt; &lt;version&gt;2.3&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;unpack&lt;/id&gt; &lt;configuration&gt; &lt;skip&gt;false&lt;/skip&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre> <p>And some final words, upon installing the final project, this trick takes all the dependencies, extract them into Eclipse output folder, which is defined to be './bin' (Default ADT plugin output folder, if I'm not mistaken). Later, Eclipse build the APK using the data, it has in its output folder, wallah, you have and apk which F11 can launch a debugger with.</p> <p>Again this works for me... and I hope this would help you too.</p> <p>Share your thought... Adam. </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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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