Error android ... CoordinatorLayout - Android Studio

0

I would like to learn how to develop mobile applications with android studio but I get an error in the ADK emulator, they would know, what is the problem, and how to solve it?

The problem is that when you install the Android Studio, that was all right, I did not execute me before the emulator, but one thing ... I did not know the why ... and put me, but I emulator the gray screen comes up with 'android ... CoordinatorLayout', I have seen that in the right part above in the 'text' section, there is a small exclamation that informs me that there is the following error:

It seems to say, that he failed to find the style coordinatorLayoutStyle ', what does that mean?

Thank you.

    
asked by cat_12 22.09.2018 в 17:06
source

3 answers

0

I already found the answer, the error is in build.gradle (Module: app): in the dependencies section:

I had to put it:

implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support:design:28.0.0-alpha1'

Sometimes according to your PC it will look like this:

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'

or     implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'     implementation 'com.android.support:design:28.0.0-alpha3'

If you get both a form and the other you have to put this if or if:

implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support:design:28.0.0-alpha3'

Source: link

    
answered by 22.09.2018 / 22:37
source
0

It is a very common error with version 28 of SDK . One solution is to go to gradle and decrease the version of Sdk to 27:

compileSdkVersion 27
targetSdkVersion 27

And also change implemantation to version 27:

implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1' 

You'll have to download SDK 27, like this:

 File-Settings-Appearance & Behavior-System Settings-Android SDK-SDK Platforms- Android 8.1 (Oreo) API Level 27
    
answered by 22.09.2018 в 21:00
0

Insert this line below, in the theme of the application.

<style name="AppTheme.NoActionBar"> <item name="coordinatorLayoutStyle">@style/Widget.Design.CoordinatorLayout</item> </style>

    
answered by 22.09.2018 в 21:01