I am wondering how I can install Sevntu on Android Studio without using the JAR. I've added the maven url and everything works when I point to the local JAR file during the third-party configuration for Checkstyle, but is there a way to not use the JAR?
Thank you!
Unfortunately not. At the time of this writing (early 2019), you must use the JAR.
The Checkstyle plugin does not currently support build tool integration, and that is a feature that is also not on the roadmap at the moment (#107).
Since you are using maven, just include the sevntu maven plugin as a dependency with checkstyle.
Example: https://github.com/checkstyle/checkstyle/blob/c0e131dbc43a17537498432b14cc7e7743ecf407/pom.xml#L547-L551
<dependency>
<groupId>com.github.sevntu-checkstyle</groupId>
<artifactId>sevntu-checkstyle-maven-plugin</artifactId>
<version>1.32.0</version>
</dependency>
Related
I need to include appcompat-v7 in a maven build. Please note this is a question about a library with resources and not a jar. It's currently an aar artifact. The documentations on the SDK Deployer does not cover version 23.1.0 or version 23.0.1. I need to know what dependency needs to be in pom to include the compatibility library. Its either aar or apklib, and or also the include of a jar file as well. If anyone has got this working I would appreciate it if you would share the correct pom dependency. This problem appears to have been solved here:
How can I add an apklib dependency to your android maven project?
but this solution expressed in latest Android would be:
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v7-appcompat</artifactId>
<version>23.1.0</version>
<type>apklib</type>
</dependency>
This does not work now because apklib is not what is there. It is aar and changing type to aar does not seem to work either. Resulting in lots of conflicts or missing classes or class conflicts. I can think of no more commonly needed library from SDK Deployer than this. So could someone please answer the quesiton. In addition, I think the documentation of the deployer should reflect current versions, not just versions that are years old. Thanks.
The documentation of the SDK deployer references all dependencies that are custom created in addition to the ones from the repositories of the SDK itself. You can run the deployer and deploy all the components into a repository manager like Nexus and then search there or you can browse the local file system repository in ~/.m2/repository. For example look in the directory ~/.m2/repository/com/android/support/appcompat-v7/
In your case you probably want to use something like
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>23.1.1</version>
<type>aar</type>
</dependency>
This is all mentioned in the docs. And the deployer is open source and I do accept pull requests ;-)
I'm doing an Android app that needs the latest support library.
If I understand correctly the latest version is 22.2.0
So I'm trying to get the com.android.support - appcompat-v7 version 22.2.0 dependency but it is not found on search.maven.org
As one can see, it is the one required by the gradle dependency on this article:
http://androidgifts.com/navigation-view-using-design-support-library/#comment-11
The latest android sdk android-sdk_r24.3.3-linux.tar does not have it. It only has the 22.2.0 version.
How come Maven does not have it ?
Any way to download it ?
As mentioned here > Android support library setup with maven google actually don't care much for maven users...
One of the answers mentioned there might help you (probably not as easy as you'd like, but...): https://stackoverflow.com/a/22602712/4405559
I'd also advise you to try finding a github repo containing the newest appcompat (the question I've linked has also got an answer mentioning how you can create your own repo, if needed).
I have just followed the steps in this stackoverflow answer in my maven project: https://stackoverflow.com/a/22602712/4405559 and it works perfectly.
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>22.2.0</version>
<type>aar</type>
</dependency>
The gradle dependency would be:
compile 'com.android.support:appcompat-v7:22.2.0#aar'
(If it doesn't find it you may need to add the local android support m2repository folder to your repositories. See this answer: https://stackoverflow.com/a/25365406/2199475)
Just make sure you have run check for updates in the Android SDK Manager and install the correct api and associated SDK Build-tools.
Ok, so, I'm developing an app for the Amazon FireTV, so I have to use Eclipse.
I'm trying to use this socket.io Java client library: https://github.com/nkzawa/socket.io-client.java
at the bottom of this post, i included the installation instructions, which I'm not really sure how to make work with my existing Eclipse project (I'm new to maven). so from my understanding, do i just add a pom.xml file and a test folder? Then paste in their "maven central code" into the pom.xml? Will this cause any issues with the other code in my project? Or, can I just copy and paste all their SRC code into my project, since it's MIT licensed? I'd rather learn how to do this the proper way. The project is not in JAR format, so I was thinking maybe copying the folder structure into my project then using the Project Properties, Add Library option to connect to my code? Maybe?
Their installation instructions, (available in their readme.md):
The latest artifact is available on Maven Central. Add the following dependency to your pom.xml.
<dependencies>
<dependency>
<groupId>com.github.nkzawa</groupId>
<artifactId>socket.io-client</artifactId>
<version>0.3.0</version>
</dependency>
</dependencies>
Or to install it manually, please refer dependencies to pom.xml.
Add it as a gradle dependency for Android Studio, in build.gradle:
compile 'com.github.nkzawa:socket.io-client:0.3.0'
So, I learned that Maven Central has JAR files available for download. That way, you can just include them in your project via the Project Properties dependencies options. Without having to learn Maven.
You need to first understand how Maven works (and what pom.xml stands for). Maven is a tool that helps you automatically install dependencies (files need) for a given project. E.g if a project needs to process json files, it will need to "import" a json library which will then be a dependency for that project. When you add the dependency file above to your project, and run Maven install, it goes and fetches all the dependencies for your socket.io-client to work.
Unfortunately, Maven does work very well in building android application projects and can be fairly complex to setup correctly (from my limited experience). I would advise that you manually download the jar dependencies and then add them to your android classpath if you are not keen on investing a lot of time learning to use Maven.
To manually install the files .. you can create a default maven project (http://www.tech-recipes.com/rx/39279/create-a-new-maven-project-in-eclipse/) in eclipse, add the dependency file above to your pom.xml and run Maven-install. This will download the dependencies you need to your Maven local repository. You can then copy them from there to your android project.
Regarding installing the socket.io client you can find more on these steps here
http://denvycom.com/blog/socket-io-java-android-without-maven/
I'm tryng to setup the new AdMob SDK using instructions on this Google site for ANT (not gradle).
This answer talks about the same problem, but it was asked before google decided to do awat with .jars distribution for Admob and included it in google play services.
I am baffled that the official site does not even talks about ANT configuration at all.
Is there a way to set it up, or do I have to give up and use gradle instead ?
If you use Ant you are pretty much on your own.
You will need to :
Unpack the Google Play Services AAR
Add each of the embedded jars onto your build classpath
Add each of the embedded jars onto your DEX path
Or you can use Maven or Gradle.
If you are using Maven (my choice) then just add the following dependency to your project. NB you will want to include the android-maven-plugin in your POM too.
https://github.com/simpligility/android-maven-plugin
<dependency>
<groupId>com.google.android.gms</groupId>
<artifactId>play-services</artifactId>
<version>${play-services.verson}</version>
</dependency>
I have an Android Project where I need to build multiple versions of the same application from the same sources.
To do this, I use the android plugin for Maven
Each version must be able to include ads from admob. So in my POM I added this dependancy
<dependency>
<groupId>com.admob.android</groupId>
<artifactId>ads</artifactId>
<version>20101109-ANDROID-3312276cc1406347</version>
<scope>system</scope>
<systemPath>THE_PATH\libs\admob-sdk-android.jar</systemPath>
</dependency>
I don't get any errors at build time but, when I execute the application I get this exception
java.lang.ClassNotFoundException: com.admob.android.ads.AdView
So apparently the package is not properly included ?
You can NOT use system scope for runtime required libraries. Deploy the jar into your local repository or your repository server (using e.g. mvn install:installFile ..) and remove scope and systemPath from the dependency declaration.
Update: As of the latest releases my Maven Android SDK Deployer can do the install of the AdMob jar from the SDK into your local Maven repository or repository server for you.
To use the Maven Android SDK Deployer, do the following:
Clone the repo:
git clone https://github.com/mosabua/maven-android-sdk-deployer.git
Go to your SDK Manager and install all APIs (this may take a while if you haven't done it yet)
Make sure you have the correct environment variable set for ANDROID_HOME. For Windows this might be:
set ANDROID_HOME=c:/android-sdk-windows
Run the installer:
c:\Tools\maven-android-sdk-deployer>mvn install
After you have done this you can just use all the android dependencies from your pom.xml, e.g.
<dependency>
<groupId>com.google.android.admob</groupId>
<artifactId>admob</artifactId>
<version>6.4.1-r11</version>
</dependency>
(There's a whole list on the github page)