Doubt with component change in eclipse migration to android studio

Asked

Viewed 38 times

0

I have an app that was migrated from the eclipse, it uses a component: http://actionbarsherlock.com/, but it generates error in opening the application, so I needed to comment on the code below so that it was possible to compile the project, I need to replace this component so that the menu options are visualized , basically it mounts the application menu, are only 3 aap screens:

inserir a descrição da imagem aqui

 O código comentado foi este:
//alterado
//ActionBar actionBar = getSupportActionBar();
//actionBar.setTitle(" Sistema ");
//getSupportActionBar().setSubtitle(" TESTE");
//getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor("#1985CB")));
Error:Could not find com.android.support:appcompat-v7:22.2.1.
Searched in the following locations:
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/support/appcompat-v7/22.2.1/appcompat-v7-22.2.1.pom
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/support/appcompat-v7/22.2.1/appcompat-v7-22.2.1.jar
    https://jcenter.bintray.com/com/android/support/appcompat-v7/22.2.1/appcompat-v7-22.2.1.pom
    https://jcenter.bintray.com/com/android/support/appcompat-v7/22.2.1/appcompat-v7-22.2.1.jar
Required by:
    :SafariProjetoPanda:unspecified

Please install the Android Support Repository from the Android SDK Manager.
<a href="openAndroidSdkManager">Open Android SDK Manager</a>

1 answer

0

Give a check in your file build.Gradle inside the directory app, see if you have these inlets on the dependencies:

compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:support-v4:22.2.1'

But anyway, it’s good that you post the error that is being presented in Logcat, otherwise the chance of errors gets too long.

Hugs.

  • didn’t work out, I would need to change it

  • minSdkVersion 8 targetSdkVersion 8

  • It seems to me that your targetSdkVersion ta very low, api 8 is android 2.2, that’s right?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.