Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid/Maven: Cannot access XmlPullParser
    text
    copied!<p>I've been trying to build an Android app using Fragments for almost two days and I'm using Maven. If I try to build my app Maven gives the following error:</p> <pre><code>[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Pontes Het Goese Lyceum 2.0 [INFO] ------------------------------------------------------------------------ [WARNING] The POM for com.google.android:android:jar:2.2.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ pontes --- [INFO] Deleting C:\Users\Koen\Android\Apps\Pontes Het Goese Lyceum\target [INFO] [INFO] --- android-maven-plugin:3.3.0:generate-sources (default-generate-sources) @ pontes --- [INFO] ANDROID-904-002: Found aidl files: Count = 0 [INFO] ANDROID-904-002: Found aidl files: Count = 0 [INFO] C:\android-sdk-windows\platform-tools\aapt.exe [package, -m, -J, C:\Users\Koen\Android\Apps\Pontes Het Goese Lyceum\target\generated-sources\r, -M, C:\Users\Koen\Android\Apps\Pontes Het Goese Lyceum\AndroidManifest.xml, -S, C:\Users\Koen\Android\Apps\Pontes Het Goese Lyceum\res, --auto-add-overlay, -A, C:\Users\Koen\Android\Apps\Pontes Het Goese Lyceum\assets, -I, C:\android-sdk-windows\platforms\android-8\android.jar] [INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ pontes --- [debug] execute contextualize [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Users\Koen\Android\Apps\Pontes Het Goese Lyceum\src\main\resources [INFO] skip non existing resourceDirectory C:\Users\Koen\Android\Apps\Pontes Het Goese Lyceum\target\generated-sources\extracted-dependencies\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ pontes --- [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! [INFO] Compiling 11 source files to C:\Users\Koen\Android\Apps\Pontes Het Goese Lyceum\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] C:\Users\Koen\Android\Apps\Pontes Het Goese Lyceum\src\com\koenv\pontes\RoosterFragment.java:[13,24] error: cannot access XmlPullParser [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.928s [INFO] Finished at: Sat Aug 18 14:36:21 CEST 2012 [INFO] Final Memory: 13M/247M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project pontes: Compilation failure [ERROR] C:\Users\Koen\Android\Apps\Pontes Het Goese Lyceum\src\com\koenv\pontes\RoosterFragment.java:[13,24] error: cannot access XmlPullParser [ERROR] -&gt; [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException </code></pre> <p>I'm using the following pom.xml:</p> <pre><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/maven-v4_0_0.xsd"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;com.koenv&lt;/groupId&gt; &lt;artifactId&gt;pontes&lt;/artifactId&gt; &lt;version&gt;2.0&lt;/version&gt; &lt;packaging&gt;apk&lt;/packaging&gt; &lt;name&gt;Pontes Het Goese Lyceum&lt;/name&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;2.2.1&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;com.google.android&lt;/groupId&gt; &lt;artifactId&gt;support-v4&lt;/artifactId&gt; &lt;version&gt;r7&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; &lt;finalName&gt;${project.artifactId}&lt;/finalName&gt; &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt; &lt;pluginManagement&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;com.jayway.maven.plugins.android.generation2&lt;/groupId&gt; &lt;artifactId&gt;android-maven-plugin&lt;/artifactId&gt; &lt;version&gt;3.3.0&lt;/version&gt; &lt;extensions&gt;true&lt;/extensions&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/pluginManagement&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;com.jayway.maven.plugins.android.generation2&lt;/groupId&gt; &lt;artifactId&gt;android-maven-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;sdk&gt; &lt;!-- platform or api level (api level 4 = platform 1.6)--&gt; &lt;platform&gt;8&lt;/platform&gt; &lt;/sdk&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre> <p>And the file in which the error is detected is just a simple Fragment:</p> <pre><code>package com.koenv.pontes; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; public class RoosterFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.mijn_rooster, container, false); } } </code></pre> <p>What am I doing wrong, I'm using 'maven clean install' on Windows.</p>
 

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