2016-03-21 11 views
0

MPAndroidChartライブラリをaarではなくjarとしてコンパイルするにはどうすればよいですか?私がgradle assembleDebugを実行すると、私にaarが生成されますが、古いMPAndroidChartディストリビューションでは、すでにJARの依存関係が提供されています。MPAndroidChartライブラリをaarの代わりにjar出力でコンパイル

私は、readmeファイルでコンパイル命令をグラデーションするためのものが見つかりませんでした。また、 "gradle tasks"は私を助けませんでした。

ここにヘルプがありますか?

ありがとうございました。

答えて

1

この質問はもうすぐ前に聞かれましたが、将来の開発者の参考になります。

  1. Mavenプロジェクトに変換し、設定し、右クリック(Mavenプロジェクトにプロジェクトを変換するあなたは、Android MPAndroidChartLibhttps://github.com/PhilJay/MPAndroidChart/releases)上で見る正確なパッケージ構造
  2. で、Eclipseプロジェクトを作成します。
  3. 以下で生成されたpom.xmlを置き換える:

    <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"> 
    
        <modelVersion>4.0.0</modelVersion> 
        <groupId>com.github.mikephil</groupId> 
        <artifactId>MPAndroidChart</artifactId> 
        <version>1.4.2-SNAPSHOT</version> 
        <name>MPAndroidChart</name> 
        <description>A simple Android chart view/graph view library, supporting line- bar- and piecharts as well as scaling, dragging and animations</description> 
        <url>https://github.com/PhilJay/MPAndroidChart</url> 
        <packaging>jar</packaging> 
    
        <build> 
         <sourceDirectory>src</sourceDirectory> 
         <plugins> 
          <plugin> 
           <artifactId>maven-compiler-plugin</artifactId> 
           <version>3.3</version> 
           <configuration> 
            <source>1.7</source> 
            <target>1.7</target> 
           </configuration> 
          </plugin> 
         </plugins> 
        </build> 
    
        <properties> 
         <jdk.version>1.7</jdk.version> 
        </properties> 
    
        <dependencies> 
         <dependency> 
          <groupId>com.google.android</groupId> 
          <artifactId>android</artifactId> 
          <scope>provided</scope> 
          <version>4.1.1.4</version> 
         </dependency> 
         <dependency> 
          <groupId>junit</groupId> 
          <artifactId>junit</artifactId> 
          <version>4.12</version> 
          <scope>test</scope> 
         </dependency> 
         <dependency> 
          <groupId>org.mockito</groupId> 
          <artifactId>mockito-core</artifactId> 
          <version>1.9.5</version> 
         </dependency> 
        </dependencies> 
    
        <issueManagement> 
         <url>https://github.com/PhilJay/MPAndroidChart/issues</url> 
         <system>GitHub Issues</system> 
        </issueManagement> 
    
        <licenses> 
         <license> 
          <name>Apache License Version 2.0</name> 
          <url>http://www.apache.org/licenses/LICENSE-2.0.html</url> 
          <distribution>repo</distribution> 
         </license> 
        </licenses> 
    
        <scm> 
         <url>https://github.com/PhilJay/MPAndroidChart</url 
         <connection>scm:git:git://github.com/PhilJay/MPAndroidChart.git</connection> 
         <developerConnection>scm:git:[email protected]:PhilJay/MPAndroidChart.git</developerConnection> 
        </scm> 
    
        <developers> 
         <developer> 
          <name>Philipp Jahoda</name> 
          <email>[email protected]</email> 
          <url>http://stackoverflow.com/users/1590502/philipp-jahoda</url> 
          <id>PhilJay</id> 
         </developer> 
        </developers> 
    
    </project> 
    
  4. maven installにポンポンを右クリックし、クリックしてください

  5. あなたは下のjarファイルを見つけることができます:/target

関連する問題