jetty-project / i-jetty

Jetty for Android (moved from code.google.com)
277 stars 99 forks source link

how to solve build fail with android sdk tool r18 #102

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I'd installed android sdk tool r18 in my Linux machine
2. Retrieve newest i-jetty and build
3. There were a NoSuchMethodException due to 
com.android.sdklib.build.ApkBuilder.addNativeLibraries was changed.
4. I modified i-jetty-ui/pom.xml to change maven-android-plugin version from 
2.9.0-beta-5 to 3.0.0-alpha-11. There were another exception: 
 com.android.sdklib.build.DuplicationFileException.

What is the expected output? What do you see instead?
The project can build with maven-android-plugin 3.0.0 and android sdk tool r18. 

My solution after one week research:
in i-jetty-ui/pom.xml :
Add this section in tag "plugins"
<plugin>
  <groupId> com.jayway.maven.plugins.android.generation2</groupId>
  <artifactId>android-maven-plugin</artifactId>
  <version>3.1.1</version>
  <extensions>true</extensions>
  <configuration>
    <sdk>
      <platform>4<platform>
    </sdk>
    <deleteConflictingFiles>true</deleteConfilictingFiles>
    <extractDuplications>true</extractDuplications>
    <undeployBeforeDeploy>true</undeployBeforeDeploy>
  </configuration>
</plugin>

It's a workaround. Because it seems the problem was not belong i-jetty but 
maven-android-plugin.

Test passed in Ubuntu and OS x.

Thanks for guys, you made a great project.

Best regards,
Zhentao Huang

Original issue reported on code.google.com by zhentao....@gmail.com on 23 Apr 2012 at 7:37