34
我想在我的android項目中嘗試使用這個library。我正在使用Android Studio 0.4.6。使用maven資源庫將java庫添加到Android Studio項目
的README.markdown文件告訴我要插入這裏面的pom.xml:
<!-- in the 'repositories' section -->
<repository>
<id>keytwo.net</id>
<name>Keytwo.net Repository</name>
<url>http://audiobox.keytwo.net</url>
</repository>
<!-- in the 'dependencies' section -->
<dependency>
<groupId>io.socket</groupId>
<artifactId>socket.io-client</artifactId>
<version>0.2.1</version> <!-- the desidered version -->
</dependency>
的問題是,我沒有任何的pom.xml。我在我的項目根目錄中創建了一個同步gradle設置,但它什麼都不做。直到現在,我只使用已編譯的.jar文件或使用gradle編譯功能。
如何在我的項目中使用此庫?
謝謝。這是一個非常明確的答案:) – letiagoalves
@Scott Barta。那麼,Android Studio中的Maven的主要目的是什麼?在什麼情況下,Maven是必須的選擇? – rxlky
@Halim它不使用Maven作爲構建器,但Gradle使用一些小部件,比如能夠下載POM格式的依賴關係,這就是所謂的。 –