Android Maven Eclipse仍然无法导入apklib

前端之家收集整理的这篇文章主要介绍了Android Maven Eclipse仍然无法导入apklib前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个 Android Maven项目,我正在尝试使用Eclipse.我也在使用Android Support v7 AppCompat库.在我的pom.xml中,我正在导入apklib和jar.我已经尝试更新到m2e-android插件的0.4.3-SNAPSHOT版本,但我仍然得到错误
  1. Description Resource Path Location Type
  2. dependency=[android.support:compatibility-v7-appcompat:apklib:18:compile] not found in workspace pom.xml /Studio54 line 1 me.gladwell.eclipse.m2e.android.markers.dependency.apklib

这是我的pom.xml

http://maven.apache.org/maven-v4_0_0.xsd\”\u0026gt;
4.0.0
com.lhs.app
Studio54的
0.0.7-SNAPSHOT
APK
Studio54的

  1. <repositories>
  2. <repository>
  3. <id>ossSonatype</id>
  4. <url>https://oss.sonatype.org/content/groups/public</url>
  5. <releases>
  6. <enabled>true</enabled>
  7. </releases>
  8. <snapshots>
  9. <enabled>true</enabled>
  10. </snapshots>
  11. </repository>
  12. </repositories>
  13.  
  14. <properties>
  15. <platform.version>4.3_r1</platform.version>
  16. </properties>
  17.  
  18. <dependencies>
  19. <dependency>
  20. <groupId>android</groupId>
  21. <artifactId>android</artifactId>
  22. <version>${platform.version}</version>
  23. <scope>provided</scope>
  24. </dependency>
  25. <dependency>
  26. <groupId>android.support</groupId>
  27. <artifactId>compatibility-v4</artifactId>
  28. <version>18</version>
  29. </dependency>
  30. <dependency>
  31. <groupId>android.support</groupId>
  32. <artifactId>compatibility-v7-appcompat</artifactId>
  33. <version>18</version>
  34. <type>apklib</type>
  35. </dependency>
  36. <dependency>
  37. <groupId>android.support</groupId>
  38. <artifactId>compatibility-v7-appcompat</artifactId>
  39. <version>18</version>
  40. <type>jar</type>
  41. </dependency>
  42. <dependency>
  43. <groupId>com.google.code.gson</groupId>
  44. <artifactId>gson</artifactId>
  45. <version>2.2.4</version>
  46. </dependency>
  47. <dependency>
  48. <groupId>com.google.android</groupId>
  49. <artifactId>volley</artifactId>
  50. <version>0.0.1-SNAPSHOT</version>
  51. </dependency>
  52. <dependency>
  53. <groupId>com.testflight</groupId>
  54. <artifactId>lib</artifactId>
  55. <version>1.0</version>
  56. </dependency>
  57. <dependency>
  58. <groupId>org.robolectric</groupId>
  59. <artifactId>robolectric</artifactId>
  60. <version>2.2-SNAPSHOT</version>
  61. <scope>test</scope>
  62. </dependency>
  63. <dependency>
  64. <groupId>junit</groupId>
  65. <artifactId>junit</artifactId>
  66. <version>4.9</version>
  67. <scope>test</scope>
  68. </dependency>
  69. <dependency>
  70. <groupId>org.mockito</groupId>
  71. <artifactId>mockito-core</artifactId>
  72. <version>1.9.5</version>
  73. <scope>test</scope>
  74. </dependency>
  75. </dependencies>
  76.  
  77. <build>
  78. <plugins>
  79. <plugin>
  80. <groupId>com.jayway.maven.plugins.android.generation2</groupId>
  81. <artifactId>android-maven-plugin</artifactId>
  82. <version>3.6.1</version>
  83. <configuration>
  84. <androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
  85. <assetsDirectory>${project.basedir}/assets</assetsDirectory>
  86. <resourceDirectory>${project.basedir}/res</resourceDirectory>
  87. <nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>
  88. <sdk>
  89. <platform>16</platform>
  90. </sdk>
  91. <undeployBeforeDeploy>true</undeployBeforeDeploy>
  92. </configuration>
  93. <extensions>true</extensions>
  94. </plugin>
  95.  
  96. <plugin>
  97. <artifactId>maven-compiler-plugin</artifactId>
  98. <version>2.5.1</version>
  99. <configuration>
  100. <source>1.6</source>
  101. <target>1.6</target>
  102. </configuration>
  103. </plugin>
  104. </plugins>
  105. </build>

解决方法

你可以尝试更新你的android sdk.并从Help-> Check for Updates选项卡中查看eclipse更新.

猜你在找的Android相关文章