Problems playing Android Studio 1.5.1

I am new to Android studio and I have a new version installed (version 1.5.1). For some reason, I constantly get an error message (every time I use the application theme), saying that there were problems with the processing: there are no styles. I searched for online solutions, but most of them are outdated or just not working.

Error image

Thanks for any help.

Manifest file:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.easycodingplus.myapplication"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity" android:label="@string/app_name" android:theme="@style/AppTheme.NoActionBar"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> 

Gradle assembly:

 apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.easycodingplus.myapplication" minSdkVersion 8 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:design:23.1.1' } 
+6
source share
7 answers

just change your style.xml file as follows

 <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> 

and then go to

File> Project Structure> Application>

and install (both should be the same with the latest version)

source compatibility : 1.7

Target compatibility : 1.7

+4
source

Please make sure your build.gradle file has a lateet AppCompat library specified as a dependency:

com.android.support:appcompat-v7:23.1.0

Can you post what style the error belongs to? You may need to add a style to the res> values> styles folder. Something in your code probably refers to a style that does not exist in this folder.

0
source

you need to include dependencies for the design, which will be such that it will be added to the dependencies block of the app build.gradle module

 compile 'com.android.support:design:23.1.1' 

it should be something like this.

you need this support library like CoordinatorLayout , AppBarLayout and FloatingActionButton its part

enter image description here

create style in style file

 <style name="AppTheme" parent="Base.Theme.AppCompat.Light"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> </style> 

and indicate that in your AndroidManifest file

 <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:largeHeap="true" android:supportsRtl="true" android:theme="@style/AppTheme">// like this 
0
source

try as follows:

save internet connection

go to the "file" on the android studio toolbar, click on "invalidate caches / Restart" and select "invalidate and restart"

0
source

I also ran into the same problem, so I did ... go to sdk manager -> tick android 5.1.1 api level 22 and installed it .... tick android 5.1.1 api level 22 and installed it .. then go to the preview window and select a different version

then go to Preview window and select other version

0
source

3 options

1.Select a lower level API version

I have 23, but you can go to 19 or 21

2.Add Base on styles.xml

Select a theme from the AppTheme or dealer here

3.Install the previous SDK (if you want)

0
source

I ran into the same problem and these steps helped me solve this problem: 1. File> Other settings> Default settings> Appearances and behavior> File encoding. 2. Change the project encoding to windows-1252. Then: 3. File> Invalidate Chaches / Restart. OR RANDOM CASE Change the theme to Material light or something else, one of them should work. Hope this helps.

-1
source

All Articles