Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown packaging apk

I am trying to import an existing android application in eclipse. Eclipse is complaining about unknown packaging apk.

Maven 3.2.1 version. I tried different configurations under plugin xml tag but nothing works.

Below is my pom file:

<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">
<modelVersion>4.0.0</modelVersion>

<artifactId>android</artifactId>
<version>4.7.0</version>
<packaging>apk</packaging>

<dependencies>

    <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android</artifactId>
        <scope>provided</scope>
    </dependency>
</dependencies>

<parent>
    <groupId>com.google.test</groupId>
    <artifactId>test-parent</artifactId>
    <version>3.1.1-SNAPSHOT</version>
</parent>

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <extensions>true</extensions>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                                    <artifactId>android-maven-plugin</artifactId>
                                    <versionRange>[1.0.0,)</versionRange>
                                    <goals>
                                        <goal>generate-sources</goal>
                                        <goal>proguard</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore/>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>

        </plugins>
    </pluginManagement>
</build>

<name>Test app</name>
<description>Test</description>

like image 914
Amit Avatar asked Dec 06 '25 23:12

Amit


1 Answers

If the POM you're quoted above is complete, it looks as though you haven't added the android-maven-plugin to the pluginManagement section of your POM.

Something like this:

<pluginManagement>
  <plugins>
    <plugin>
      <groupId>com.jayway.maven.plugins.android.generation2</groupId>
      <artifactId>android-maven-plugin</artifactId>
      <version>3.9.0-rc.2</version>
      <extensions>true</extensions>
    </plugin>
  </plugins>
</pluginManagement>
like image 126
Ricardo Gladwell Avatar answered Dec 09 '25 14:12

Ricardo Gladwell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!