0

I have imported successfully from Maven Repository the com.actionbarsherlock:actionbarsherlock:4.4.0 and com.android.support:support-v4:20.0.0. But when i try to import

import com.actionbarsherlock.app.SherlockActivity;

it doesnt import and also if i try to run the application i get a similar error to: Multiple dex files define Android studio error when trying to import Google Maps into Google Maps project

I dont get the point here why the action bar sherlock library is not imported correctly even that the maven repository is added to dependency correctly .

enter image description here

Community
  • 1
  • 1
Olsi Saqe
  • 383
  • 5
  • 12
  • possible duplicate of [Multiple dex files define Landroid/support/v4/ in android studio](http://stackoverflow.com/questions/23264223/multiple-dex-files-define-landroid-support-v4-in-android-studio) – 2Dee Sep 30 '14 at 14:26

1 Answers1

1

The problem is solved. I found out the solution by changing build.gradle of my app and adding the @aar part in the compile section of actionbarsherlock

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v4:20.0.0'
    compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
}

This solved the problem and i found out the solution reading this:

https://code.google.com/p/maven-android-plugin/wiki/ApkLib

Olsi Saqe
  • 383
  • 5
  • 12