Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Support Library v7 + Maven + Eclipse: apklib dependency not found in workspace

I'm trying to configure the library v7 support in my project so that it uses ActionBarActivity, thus keeping compliant with some of the Android 2.X versions.

First, follow the documentation from Google and imported the project android-support-v7-appcompat as a library in accordance with Section Adding libraries with resources on Support Library Setup. But this way my Maven Build failed because it could not find the dependence of the library in question.

Now, I decided to seek a cleaner solution, keeping my dependences managed by Maven. To do this follow the instructions of the answer, but using version 19.0.1. This made my Maven Build it were executed successfully, but my project is not compiling in my workspace, the following error occurs on first line of my POM:

dependency=[com.android.support:appcompat-v7:apklib:19.0.1:compile]not found in workspace

My dependencies are as follows:

<dependency>
    <groupId>com.android.support</groupId>
    <artifactId>appcompat-v7</artifactId>
    <version>${com.android.support-version}</version>
    <type>apklib</type>
</dependency>
<dependency>
    <groupId>com.android.support</groupId>
    <artifactId>appcompat-v7</artifactId>
    <version>${com.android.support-version}</version>
    <type>jar</type>
</dependency>

The project in question is on GitHub, if they want to view it: https://github.com/veniltonjr/msplearning

Thank you in advance!

like image 221
falvojr Avatar asked Oct 21 '22 11:10

falvojr


1 Answers

First, there is no apklib for com.android.support:appcompat-v7. It only ships as an aar.

Second, that library is not available in maven-central, it ships with the Android SDK. You need to manually deploy it to your local maven repository.

Though you can use maven-sdk-deployer to construct and deploy the apk to your local folder. But you github project is failing due to missing internal dependencies. com.msplearning.android-support-v4:jar:19.1.0, com.msplearning:android-support-v7-appcompat:jar:19.1.0

like image 126
William Avatar answered Oct 27 '22 10:10

William