android studio でのエラーについて
andorid studioを使用してアンドロイドアプリを作成しています。
特に設定を変更するようなことをした覚えはないのですが
「Gradleプロジェクトの同期に失敗しました。基本的な機能(編集、デバッグなど)は正しく機能しません。
と突然でるようになり、実行もビルドもできなくなりました。
プロジェクトとしては他PCでは問題がないようで、私のPCでのみ起きているようです。
動作するプロジェクトをまるとご自PCに持ってきてもエラーがでます。
発生しているエラーメッセージ
Gradle同期失敗時 エラー:Failed to resolve: recyclerview-v7 <a href="openFile:****PATH***app/build.gradle">Open File</a> 再ビルド実行時 エラー:Could not resolve all files for configuration ':app:debugCompileClasspath'. > Could not find recyclerview-v7.jar (com.android.support:recyclerview-v7:26.1.0). Searched in the following locations: https://jcenter.bintray.com/com/android/support/recyclerview-v7/26.1.0/recyclerview-v7-26.1.0.jar
Gradle
プロジェクトのGradle // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() google() } dependencies { classpath 'com.android.tools.build:gradle:3.0.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() google() } } task clean(type: Delete) { delete rootProject.buildDir }
アプリのGradle apply plugin: 'com.android.application' android { signingConfigs { config { keyAlias ***** keyPassword ***** storeFile file('*****') storePassword ***** } } compileSdkVersion 26 buildToolsVersion "26.0.2" useLibrary 'org.apache.http.legacy' defaultConfig { applicationId "*****" minSdkVersion 23 targetSdkVersion 25 versionCode 1 versionName '1.0' testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" signingConfig signingConfigs.config } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.config } NoSign { debuggable false } debug { signingConfig signingConfigs.config } } packagingOptions { exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/NOTICE' exclude 'META-INF/LICENSE' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' } productFlavors { } } dependencies { implementation 'com.android.support:design:26.1.0' 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:26.+' compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.android.support:support-v4:26.+' testCompile 'junit:junit:4.12' implementation files('libs/httpcore-4.4.7.jar') implementation files('libs/httpmime-4.5.4.jar') }
試したこと
ファイル>キャッシュの破棄・再起動
.gradleフォルダの削除
androidstudioのアンインストール(関連のフォルダも含み全部削除しました。)、再インストール
検索ででてきた、方法をわからないまま張り付けてみたりしました。
例
maven {url 'https://maven.google.com'}を追加する
com.android.support:appcompat-v7:26.+' をcom.android.support:appcompat-v7:26.1.0'にする
最後に
andoroid stuido上の外部ライブラリーには該当の「com.android.support:recyclerview-v7:26.1.0」が表示されていません。
表示されるようになれば、見つかるから直るかとも思うのですが、追加の方法がわかりません。
人から引き継いだ環境で作業中にこのような問題がでてきており、非常に困っております。
私の勉強不足ではあるのですが、回答よろしくお願いします。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/10/26 00:22
2018/10/26 02:39
2018/10/26 02:43 編集
2018/10/26 11:55