IntelliJ IDEA, Maven, Android

Здравствуйте, подскажите пожалуйста что нужно установить или почитать хочу добавить в свой проект библиотеку HoloEverywhere
https://github.com/Prototik/HoloEverywhere/wiki/Maven

HoloEverywhere also available in Maven Central:

 
<dependency>
  <groupId>org.holoeverywhere</groupId>
  <artifactId>library</artifactId>
  <version>1.5.0</version>
  <type>apklib</type>
</dependency>

Куда это это нужно добавить в IntelliJ IDEA?
16 comments
Comment actions Permalink

Hi Oleg,

You need to define that dependency at pom.xml and import the change into the ide

P.S. This forum is intended for international communication, so, use english please.

Denis

0
Comment actions Permalink

Denis Zhdanov, sorry but my English very awful


You need to define that dependency at pom.xml and import the change into the id

Thanks. I'll try to do so.

0
Comment actions Permalink

I did what you said. But nothing happen :(

  1. in my Android Test project created before, I put  pom.xml (in root folder of project) with content that I posted before
  2. in IntelliJ IDEA I opened my project select  File - Import Module .. - select pom.xml then only checked Documentation press Next Next ...



here are screenshots:
2013-04-11_140309.jpg
2013-04-11_140321.jpg

2013-04-11_140336.jpg
Then I pressed Finish button but my Android project's lib folder is empty is it normal?

0
Comment actions Permalink

You showed a screenshot of your SDKs but the library should present at 'Libraries' section

Denis

0
Comment actions Permalink

Here is my project's screenshot

2013-04-11_164342.jpg

0
Comment actions Permalink

I found another way to add this library from maven but got an error :(

Right click to my project - Open Module Settings (F4) - Libraries - Plus - From Maven ... - typed org.holoeverywhere:library:1.5.0

2013-04-11_185302.jpg
Then I pressed OK button and got this error:

2013-04-11_185320.jpg

0
Comment actions Permalink

Are there any exceptions at idea.log (main menu | help | reveal log)?

Denis

0
Comment actions Permalink

Yes, it's normal. You should not store library jars inside the project if you use maven. Maven downloads libraries to local repository.
After changing pom.xml you have to call Reimport All Maven projects action on Maven Tool windows.

0
Comment actions Permalink

Погоди, если ты не использовал мавен в своём проекте, то не надо начинать его использовать только чтобы добавить библиотеку. Лучше удали pom.xml и скачай библиотеку вручную из мевеновского репозитория. (http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.holoeverywhere%22%20AND%20a%3A%22library%22)

0
Comment actions Permalink

C:\Users\%myusername%\.m2 is empty after reimport

0
Comment actions Permalink

Я знаю как jar библиотеки подключать но хотел научиться делать это через Maven многие говорят что так проще и нахваливают IntelliJ IDEA якобы там это просто делается.
Я пока лично не понял преимуществ IntelliJ IDEA 12 перед Android Developer Tools при разработке под Android пока пытаюсь освоиться и вижу только минусы по сравнению с Android Developer Tools.

UPDATE:

The custom action bar implementation within ActionBarSherlock relies on styles, themes, layouts, and drawables in order to display properly. Due to the limitations of Android and

.jar
files, this currently can not be accomplished any other way.
http://actionbarsherlock.com/faq.html

The same for Holoeverywhere too!

0
Comment actions Permalink

Denis there are only INFO and 1 WARN in C:\Users\%myusername%\.IntelliJIdea12\system\log\idea.log

...
2013-04-11 20:06:42,920 [  41802]   INFO - .history.utils.LocalHistoryLog - Local history storage successfully closed.
2013-04-11 20:06:42,925 [  41807]   WARN - api.vfs.impl.local.FileWatcher - Watcher terminated.
etc.

By the way main menu | help | show log in explorer (IntelliJ IDEA 12.1.1).
I also checked connection to all repositories and tests were successfull
2013-04-11_202606.jpg
The same error with another popular library ActionBarSherlock com.actionbarsherlock:actionbarsherlock:4.2.0

0
Comment actions Permalink

First you need to write correct pom.xml for your project. Only after it, you'll be able to include apklib dependencies through Maven. The pom needs to contain configuration of maven-android plugin and proper dependency to android platform jar. You can find related information (and download samples) there https://code.google.com/p/maven-android-plugin/

0
Comment actions Permalink

Eugene,

Why then such simple way works (but not for me)
http://habrahabr.ru/post/173547/#comment_6028889
or he is also wrote proper pom.xml?

0
Comment actions Permalink

Unfortunatelly this method doesn't work for apklib artifacts (only for jars). I think in your case it'll be easier to download holoeverywhere manually, copy it into your project, and then use "import module". I've created related issue: http://youtrack.jetbrains.com/issue/IDEA-105241

0
Comment actions Permalink

Всем большое спасибо за помощь особенно Eugene Kudelevsky. Сначала мои впечатления об IntelliJ IDEA были только отрицательные (это не из-за Maven) а сейчас немного поработав и изучив горячие клавиши и остальные плюшки мне понравилось!

p.s. Sorry for Russian, but it's very hard to translate Russian to English for me vice versa no problem. I'll try to use only English for future posts;)

0

Please sign in to leave a comment.