前提・実現したいこと
プロジェクトを作成したところ、ビルドが成功しません。
解決策があればよろしくお願いします。
build.gradleの内容
app
1apply plugin: 'com.android.application' 2 3android { 4 compileSdkVersion 27 5 defaultConfig { 6 applicationId "jp.ac.denpa.design" 7 minSdkVersion 24 8 targetSdkVersion 27 9 versionCode 1 10 versionName "1.0" 11 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 } 13 buildTypes { 14 release { 15 minifyEnabled false 16 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 } 18 } 19} 20 21allprojects { 22 repositories { 23 google() 24 25 // If you're using a version of Gradle lower than 4.1, you must instead use: 26 // maven { 27 // url 'https://maven.google.com' 28 // } 29 // An alternative URL is 'https://dl.google.com/dl/android/maven2/' 30 } 31} 32 33dependencies { 34 implementation fileTree(dir: 'libs', include: ['*.jar']) 35 implementation 'com.android.support:appcompat-v7:27.0.2' 36 implementation 'com.android.support.constraint:constraint-layout:1.0.2' 37 testImplementation 'junit:junit:4.12' 38 androidTestImplementation 'com.android.support.test:runner:1.0.1' 39 androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 40} 41 42repositories { 43 maven { 44 url 'https://maven.google.com' 45 } 46} 47
AndoroidoStudioProjects
1// Top-level build file where you can add configuration options common to all sub-projects/modules. 2 3buildscript { 4 5 repositories { 6 google() 7 jcenter() 8 } 9 dependencies { 10 classpath 'com.android.tools.build:gradle:3.1.3' 11 12 13 // NOTE: Do not place your application dependencies here; they belong 14 // in the individual module build.gradle files 15 } 16} 17 18allprojects { 19 repositories { 20 google() 21 jcenter() 22 } 23} 24 25task clean(type: Delete) { 26 delete rootProject.buildDir 27} 28
エラーメッセージ(Logcat)
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:27.0.2. Open File Show Details Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.android.support.test:runner:1.0.1. Open File Show Details Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.android.support.test.espresso:espresso-core:3.0.1. Open File Show Details Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.android.support:appcompat-v7:27.0.2. Open File Show Details Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.android.support:appcompat-v7:27.0.2. Open File Show Details Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve com.android.support:appcompat-v7:27.0.2. Open File Show Details Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve com.android.support:appcompat-v7:27.0.2. Open File Show Details
補足情報(FW/ツールのバージョンなど)
バージョン : Andoroido Studio 3.1.3
回答1件
あなたの回答
tips
プレビュー