Это происходит при открытии проектов или с открытыми проектами, я не знаю, была ли Android Studio повреждена или это может быть проблема с разрешением.
Все проекты внезапно перестали работать, и это указывает на следующую ошибку:
> Could not resolve android.arch.lifecycle:livedata:1.1.1.
Required by:
project :app > com.android.support:loader:28.0.0
> Could not resolve android.arch.lifecycle:livedata:1.1.1.
> Could not get resource
'https://dl.google.com/dl/android/maven2/android/arch/lifecycle/livedata/1.1.1/livedata-1.1.1.pom'.
> Failed to move file '/private/var/folders/yl/rjxf9qcx2rdfztl5mh93q_rm0000gn/T/gradle_download32524353575854917bin' into filestore at 'android.arch.lifecycle/livedata/1.1.1/b4b4d001ca961adb29783cfcdb61c36f877c51bf/livedata-1.1.1.pom'
> Failed to create parent directory '/Users/myuser/.gradle/caches/modules-2/files-2.1/android.arch.lifecycle/livedata' when creating directory '/Users/myuser/.gradle/caches/modules-2/files-2.1/android.arch.lifecycle/livedata/1.1.1/b4b4d001ca961adb29783cfcdb61c36f877c51bf'
У меня она установлена в MA C, и у меня нет явной зависимости в моем проекте.
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 28
defaultConfig {
applicationId 'com.example.myproject'
minSdkVersion 21
targetSdkVersion 28
versionCode 23
versionName "2.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true
}
productFlavors {
}
}
def gsonVersion = "2.8.0"
def butterKnifeVersion = "8.8.1"
def retrofitVersion = "2.3.0"
def supportVersion = "28.0.0"
def okHttpVersion = "3.7.0"
def loggingInterceptorVersion = "3.8.0"
def circleImageViewVersion = "2.1.0"
def googleServiceVersion = "17.3.4"
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.android.support:appcompat-v7:$supportVersion"
implementation "com.android.support:design:$supportVersion"
implementation "com.android.support:support-v4:$supportVersion"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation "com.google.firebase:firebase-messaging:$googleServiceVersion"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation "com.jakewharton:butterknife:$butterKnifeVersion"
annotationProcessor "com.jakewharton:butterknife-compiler:$butterKnifeVersion"
implementation 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
implementation "com.android.support:cardview-v7:$supportVersion"
implementation "com.google.code.gson:gson:$gsonVersion"
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
implementation "com.squareup.okhttp3:logging-interceptor:$loggingInterceptorVersion"
implementation "de.hdodenhof:circleimageview:$circleImageViewVersion"
implementation('io.socket:socket.io-client:1.0.0') {
exclude group: 'org.json', module: 'json'
}
implementation 'com.heinrichreimersoftware:material-intro:1.6'
dependencies {
implementation 'com.skyfishjy.ripplebackground:library:1.0.1'
}
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
implementation 'com.facebook.shimmer:shimmer:0.4.0'
implementation 'com.github.MAXDeliveryNG:slideview:1.1.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
}
apply plugin: 'com.google.gms.google-services'
И приложение gradle
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.28.1'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Я попытался обновить до последней версии gradle и обновить библиотеки, но это не удалось.
ОБНОВЛЕНИЕ:
Я попытался дать AndroidStudio полный доступ к диску, и он не работает.