Can I use AdMob SDK jar as a dependency in my Maven Android project?

I just switch the build process to Maven. I can't find the dependency of AdMob on the Maven repository site. How can I configure it manually?

For example:

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

resolvent:

A simple way is to use Lib in the source tree and use it:

...
<dependency>
  <groupId>some_admob_groupid</groupId>
  <artifactId>admob</artifactId>
  <version>admob_version</version>
  <scope>system</scope>
  <systemPath>${basedir}/lib/admob.jar</systemPath>
</dependency>
...

Of course, you need to change groupid, artifactid, version and SystemPath to meet your needs, but this method allows you to use local. Jar as a dependency in pom.xml without installing it into your repository

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>