2016-09-30 19 views
5

Błąd: wystąpił problem podczas konfigurowania projektu ": aplikacja".Nie można znaleźć pliku pomocy-v4.jar (com.android.support:support-v4:24.0.0)

Could not find support-v4.jar (com.android.support:support-v4:24.0.0). Searched in the following locations: https://jcenter.bintray.com/com/android/support/support-v4/24.0.0/support-v4-24.0.0.jar

MY SDK Tool jest jak ten obraz

enter image description here

A moja Gradle jest

buildscript { 
    repositories { 
     maven { url 'https://maven.fabric.io/public' } 
    } 

    dependencies { 
     classpath 'io.fabric.tools:gradle:1.+' 
    } 
} 
apply plugin: 'com.android.application' 
apply plugin: 'io.fabric' 

repositories { 
    maven { url 'https://maven.fabric.io/public' } 
} 



android { 

    compileSdkVersion 24 
    buildToolsVersion "24" 

    dexOptions { 
     javaMaxHeapSize "4g" //specify the heap size for the dex process 
     preDexLibraries = false //delete the already predexed libraries 
    } 


    defaultConfig { 
     applicationId "com.lionvisionsits.kkasons" 
     minSdkVersion 19 
     targetSdkVersion 24 

     multiDexEnabled false 

    } 


dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:24.0.0' 
    compile('com.digits.sdk.android:digits:[email protected]') { 
     transitive = true; 
    } 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    compile 'com.android.support:cardview-v7:24.0.0' 
    compile 'com.android.support:design:24.0.0' 
    compile 'com.android.support:recyclerview-v7:24.0.0' 
    compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2' 
    compile 'com.android.support:multidex:1.0.1' 
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' 
    compile 'com.google.code.gson:gson:2.4' 
    compile 'com.google.android.gms:play-services:9.4.0' 
    compile 'com.google.firebase:firebase-messaging:9.4.0' 
    compile 'ch.acra:acra:4.9.0' 
    compile 'com.github.bumptech.glide:glide:3.7.0' 
    compile 'me.relex:circleindicator:[email protected]' 
    compile 'com.github.arimorty:floatingsearchview:2.0.3' 
    compile('com.digits.sdk.android:digits:[email protected]') { 
     transitive = true; 
    } 
    compile 'com.android.support:support-v4:24.0.0' 
} 

apply plugin: 'com.google.gms.google-services' 

może ktoś mi pomóc?

Po aktualizacji do v24.2.1 ja dostać ten błąd w debug \ AndroidMenifest.xml enter image description here

Dzięki & Pozdrowienia Jay

+1

Dziwny problem. Ta biblioteka nie znajduje się w jcenter, ale w lokalnym repozytorium maven. Spróbuj zaktualizować Menedżera SDK i użyj kompilacji "com.android.support:support-v4:24.2.1 –

+0

Dzięki za odpowiedź. próbowałem 24.2.1, ale generuje błąd w AndroidMenifest.xml.Pozwolę mi wysłać szczegóły. – Jay

+0

i Dodano zrzut ekranu ... ple. spójrz na to @GabrieleMariotti – Jay

Odpowiedz

0

Nie ma zastosowanie buildVersionCode lub name wymagane AndroidManifest.xml. Możesz go lepiej zdefiniować w pliku aplikacji build.gradle. Jak poniżej:

defaultConfig { 
    applicationId "com.example.r" 
    minSdkVersion 15 
    versionCode 418 
    versionName "4.4.0" 

} 
5

miałem ten sam problem, aktualizacja:

classpath 'com.android.tools.build:gradle:2.+' 

i mój Gradle wrapper

distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 

i działa

+0

Pracowałem dla mnie, dzięki! – BigPun86

0

Może wersja com.android.support:support-v4:24.0.0 jest różni się od studia na Androida. Możesz spróbować zrobić tak: File-> project structure->app->dependencies->+->Library dependency, wybierz com.android.support:support-v4:xx.x.x. W przypadku problemów możesz zmienić bibliotekę na ostatnią.

2

Miałem ten sam problem, kolejne kroki naprawiły mój problem. Dać to spróbować i zobaczyć, czy to pomaga:

enter image description here

przejdź do "Plik" -> "struktury projektu ...".

Wybierz "twój projekt" pod "Moduły" i kliknij zakładkę "Zależności".

Kliknij znak "+" i wybierz "1 zależność od biblioteki".

enter image description here

W nowym oknie wybierz opcję "Wsparcie-V4" i kliknij "OK".

0

spróbować tego środka w android bloku

compileOptions { 
    sourceCompatibility = JavaVersion.VERSION_1_7 
    targetCompatibility = JavaVersion.VERSION_1_7 
} 

Lub jeśli masz model blok następnie spróbuj tego

compileOptions.with { 
    sourceCompatibility = JavaVersion.VERSION_1_7 
    targetCompatibility = JavaVersion.VERSION_1_7 
} 
Powiązane problemy