2017-12-06 1 views
0

1 초에서 다른 것까지 안드로이드 스튜디오에 다음과 같은 오류가 있습니다. 어떻게해야 할 지 전혀 알지 못합니다. 내 응용 프로그램을 시작하려고gradle (AndroidStudio)의 이상한 메시지입니다.

오류 :

Error:A problem occurred configuring project ':app'. 
> Could not resolve all dependencies for configuration ':app:_map_testApkCopy'. 
    > Could not find com.android.support:appcompat-v7:27.0.1. 
    Required by: 
     project :app 
     project :app > com.android.support:design:25.0.0 
    > Could not find com.android.support:support-v4:27.0.1. 
    Required by: 
     project :app > com.android.support:design:25.0.0 
     project :app > com.android.support:design:25.0.0 > com.android.support:transition:25.0.0 
    > Could not find com.android.support:support-annotations:27.0.1. 
    Required by: 
     project :app > com.android.support:design:25.0.0 > com.android.support:recyclerview-v7:25.0.0 
     project :app > com.android.support:design:25.0.0 > com.android.support:recyclerview-v7:25.0.0 > com.android.support:support-compat:25.0.0 
    > Could not find com.android.support:support-annotations:27.0.1. 
    Required by: 
     project :app > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-core:4.29.0 
    > Could not find com.android.support:support-core-utils:27.0.1. 
    Required by: 
     project :app > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-core:4.29.0 
    > Could not find com.android.support:appcompat-v7:27.0.1. 
    Required by: 
     project :app > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-common:4.29.0 
    > Could not find com.android.support:cardview-v7:27.0.1. 
    Required by: 
     project :app > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-common:4.29.0 
    > Could not find com.android.support:customtabs:27.0.1. 
    Required by: 
     project :app > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-common:4.29.0 
    > Could not find com.android.support:support-v4:27.0.1. 
    Required by: 
     project :app > com.facebook.android:facebook-android-sdk:4.29.0 > com.facebook.android:facebook-common:4.29.0 

build.gradle : (모바일 : 응용 프로그램이) (월 이후로 변경되지 않았다 REPO없이 변화와 비교.)

apply plugin: 'com.android.application' 

android { 
    signingConfigs { 
     sapps { 
      keyAlias 'keyalias' 
      keyPassword 'xxxxxx' 
      storeFile file('C:/eclipse/keystore/mykeystore') 
      storePassword 'xxxxxx' 
     } 
    } 
    compileSdkVersion 25 
    buildToolsVersion "25.0.3" 

    defaultConfig { 
     applicationId "appid" 
     minSdkVersion 15 
     targetSdkVersion 25 
     versionCode 179 
     versionName "2.54" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
     resValue "string", "appID", "wgd" 
     manifestPlaceholders = [iconpath: "@drawable/icon", versionCode:"161", versionName:"2.37"] 

    } 
    buildTypes { 
     demo { 
      buildConfigField "String", "appID", "\"WGD\"" 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      signingConfig signingConfigs.sapps 
      resValue "string", "app_name", "Chronica" 
      manifestPlaceholders = [iconpath: "@drawable/icon", facebookid:"@string/facebook_app_id_demo"] 
      applicationIdSuffix '.chronicbrowser' 
     } 
     demo_test { 
      buildConfigField "String", "appID", "\"WGD_TEST\"" 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      signingConfig signingConfigs.sapps 
      debuggable true 

      resValue "string", "app_name", "Chronica Test" 
      manifestPlaceholders = [iconpath: "@drawable/icon", facebookid:"@string/facebook_app_id_demo"] 
      applicationIdSuffix '.chronicbrowser_wgd_test' 
     } 
     timeline { 

      buildConfigField "String", "appID", "\"WG\"" 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      signingConfig signingConfigs.sapps 
      resValue "string", "app_name", "WorldHistory" 
      applicationIdSuffix '.chronicbrowser_wg_en' 
      manifestPlaceholders = [iconpath: "@drawable/icon_timeline", facebookid:"@string/facebook_app_id_timeline"] 
     } 
     timeline_test { 
      buildConfigField "String", "appID", "\"WG_TEST\"" 
      minifyEnabled false 
      debuggable true 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      resValue "string", "app_name", "WorldHistory Test" 
      applicationIdSuffix '.chronicbrowser_wg_en' 
      manifestPlaceholders = [iconpath: "@drawable/icon_timeline_test", facebookid:"@string/facebook_app_id_timeline"] 
      signingConfig signingConfigs.sapps 
     } 
     map { 
      buildConfigField "String", "appID", "\"WG_MAPS\"" 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      resValue "string", "app_name", "WorldHistory Atlas" 
      applicationIdSuffix '.chronicbrowser_maps_en' 
      manifestPlaceholders = [iconpath: "@drawable/icon_maps", facebookid:"@string/facebook_app_id_maps"] 
      signingConfig signingConfigs.sapps 
     } 
     map_test { 
      buildConfigField "String", "appID", "\"WG_MAPS_TEST\"" 
      //resValue "string", "RES_appID", "wgd" 
      debuggable true 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      resValue "string", "app_name", "WorldHistory Atlas Test" 
      applicationIdSuffix '.chronicbrowser_maps_en' 
      manifestPlaceholders = [iconpath: "@drawable/icon_maps_test", facebookid:"@string/facebook_app_id_maps"] 
      signingConfig signingConfigs.sapps 

     } 
     worldwarII { 
      buildConfigField "String", "appID", "\"WW2\"" 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      resValue "string", "app_name", "WorldWar II" 
      applicationIdSuffix '.chronicbrowser_ww2_en' 
      manifestPlaceholders = [iconpath: "@drawable/icon_ww2", facebookid:"@string/facebook_app_id_ww2"] 
      signingConfig signingConfigs.sapps 

     } 
     worldwarII_test { 
      buildConfigField "String", "appID", "\"WW2_TEST\"" 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      resValue "string", "app_name", "WorldWar II Test" 
      applicationIdSuffix '.chronicbrowser_ww2_en_test' 
      manifestPlaceholders = [iconpath: "@drawable/icon_ww2", facebookid:"@string/facebook_app_id_ww2"] 
      signingConfig signingConfigs.sapps 
     } 
    } 
    compileOptions.encoding = 'ISO-8859-1' 
    productFlavors { 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 

    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 

    compile 'com.android.support:appcompat-v7:25.0.0' 
    compile 'com.android.support:design:25.0.0' 
    testCompile 'junit:junit:4.12' 
    compile files('libs/lvl.jar') 
    compile files('libs/google-play-services.jar') 
    compile 'com.facebook.android:facebook-android-sdk:[4,5)' 
    compile files('libs/GoogleConversionTrackingSdk-2.2.4.jar') 
} 


repositories { 
    mavenCentral() 
} 

수 누군가 나를 도울까요?

+0

... 최신 페이스 북 SDK 지원을 필요로

구글의 메이븐 저장소를 포함하려면 라이브러리 27.0.1 – Selvin

+0

27.0.1을 추가 할 때 같은 문제가 발생합니다. 문제는 페이 스북 일뿐만 아니라 일반적으로 나타나는 것 같습니다. –

+0

그것이 더 이상 로컬 메이븐 레포에 없기 때문에 ... 여러 번 물어보십시오 – Selvin

답변

0

가장 최근 버전의 Android 라이브러리는 Google의 Maven 저장소에서 사용할 수 있습니다.

allprojects { 
    repositories { 
     google() 

     // If you're using a version of Gradle lower than 4.1, you must instead use: 
     // maven { 
     //  url 'https://maven.google.com' 
     // } 
     // An alternative URL is 'https://dl.google.com/dl/android/maven2/' 
    } 
} 

상세 사항 : 당신의 최상위build.gradle 파일

: 이상한 무엇 https://developer.android.com/studio/build/dependencies.html#google-maven

+0

감사. 나는 최신 AndroidStudio, Gradle Plugin을 설치했고 새로운 Repo로 google()을 추가했다. –

1

아마도 compile 'com.facebook.android:facebook-android-sdk:[4,5)' 일 것입니다.

compile('com.facebook.android:facebook-android-sdk:[4,5)') { 
     exclude group: 'com.android.support' 
} 

그것이 열린 버전이 유일으로 변경합니다.

+0

시도했지만, 리소스를 찾을 수없는 많은 다른 오류가 발생합니다. –

+0

upvoted yours, 왜냐하면 당신은 제게 페이스 북 버전에 관한 정확한 힌트를주었습니다. 지금 버전을 수정했습니다. 감사. –

0

다른 구성 요소에 필요한 것보다 낮은 버전의 지원 라이브러리를 사용하고 있습니다. 시도하십시오

compile 'com.android.support:appcompat-v7:27.0.1' 
    compile 'com.android.support:design:27.0.1' 
+0

모두 27.0.1 -> 대상 SDK = 27, buildToolsVersion "27.0.1", 두 줄로 변경되었습니다. 여전히 동일한 문제 –

관련 문제