Android Studio 3.1.3 render fail, missing styles, failed to insantiate one or more classes

70 Views Asked by At

I wanted to get started with learning to code for android devices and for this i've bought a course on udemy. Unfortunately after the third video I couldn't go on because of some very annoying problems in the Android studio version 3.1.3. I tried to solve the problems but since i'm just a very beginer in programming and espacially in java I didn't stand a chance to solve it on my own and sadly every solution which i've found on the internet didn't function. So here is my problem.

Every time I start a project (no matter which) the layout won't load. And then I get this 4 messages.

Pic 1

Pic 2

I think the render problem is because of the missing styles and the missing styles are because of the classes which failed to instantiate. I think the private ressources problem is independent. So I really have no clue how to solve this problem. I think i tried almost everything. Is it possible that it has something to do with the java development kid? I've downloaded the newest version but I'm not sure if Android Studio is using it. Or maybe something with the normal java software is wrong. Maybe the build.gradle will help you to find a solution:

pic 3

I really appreciate your time and your answers and if you need some further information please let me know.

Thank you and kind regards

Gmunderos7

UPDATE:

I've downloaded both versions on this website:

https://developer.android.com/studio/preview/?utm_source=android-studio

And both of them don't have this problems (just the private ressource). Would you recommend using one of the versions (or maybe an older version than 3.1.3 which don't has this problems)?

And can someone even use version 3.1.3 without such problems?

2

There are 2 best solutions below

1
Stanislav Tkach On

Step 1: "File" -> "Invalidate caches / Restart" -> "Invalidate"

Step 2: "File" -> "Close project"

Step 3: In launcher window delete your project

enter image description here

Step 4: Open your project by "Open an existing Android Studio project"

Step 5: Write nice code :)

0
Boris Van Leuven On

I had the same problem and i fixed it today, I changed my dependencies into these

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'android.arch.core:runtime:1.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.firebaseui:firebase-ui-firestore:4.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.1'
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'
compile 'com.google.firebase:firebase-core:16.0.0'
apply plugin: 'com.google.gms.google-services'

}