Error: (26, 13) Failed to resolve: com.android.support:appcompat-v7:25.0.1Error: (23, 24) Failed to resolve: com.android.support.test.espresso: espresso-core: 2.0
Here is my Gradle file
apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "25.0.1" defaultConfig { applicationId "com.example.jignesh.myapplication" minSdkVersion 25 targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.0', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:25.0.1' testCompile 'junit:junit:4.12' }
In android studio, tools-> android-> sdk manager-> sdk tools-> update android support repository rev 41.
Fixed problem with commenting out some lines in gradle
dependencies { // compile fileTree(dir: 'libs', include: ['*.jar']) // androidTestCompile('com.android.support.alert_dialog.espresso:espresso-core:2.2.2', { // exclude group: 'com.android.support', module: 'support-annotations' // }) compile 'com.android.support:appcompat-v7:26.+' compile 'com.android.support:design:26.+' compile 'com.android.support.constraint:constraint-layout:1.0.2' // testCompile 'junit:junit:4.12' }
, , ... ,
maven { url "https://maven.google.com" }
allprojects = > build.gradle
maven gradle -
allprojects { repositories { jcenter() maven { url "https://maven.google.com" } } }
, : -)
Espresso . -
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' androidTestCompile 'com.android.support.test:runner:0.5'
, - Espresso Docs
build.gradle.
build.gradle
androidTestCompile ('com.android.support.test.espresso:espresso-contrib:2.2.2'){ exclude module: 'support-annotations' exclude module: 'support-v4' exclude module: 'support-v13' exclude module: 'recyclerview-v7' exclude module: 'appcompat-v7' }
.
configurations.all { resolutionStrategy { force 'com.android.support:support-annotations:23.0.1' } }
, .
SDK SDK TOOL SDK
SDK → → → Android SDK
:
, , , , , , , activity.xml, .
-
tools == > == > == > android SDK == > SDK- Android, android 7.0 (Nougat).
android .
Android 2.2 , Android.
compile 'com.android.support:appcompat-v7:25.+'
Source: https://habr.com/ru/post/1679071/More articles:Office 365 manifest size limit - ms-wordкак найти мою версию angular в моем проекте? - angularrecipientProviders in jenkins pipe are always empty - jenkinsHow to read from an already open std :: ifstream using a buffer - c ++Android Studio Gradle Project Sync - Could not resolve espresso core and Appomppat [SOLVED] - androidWhy does Android Studio convert some primitive Kotlin types as a conditionally safe statement? - javaHide status bar only on modally presented view controller - iosJavascript: style without dots in the callback - javascriptHow to get the number of individual files in a directory in powershell? - powershellA valid signature for a template class method that returns its own type - c ++All Articles