【发布时间】:2016-01-13 17:10:51
【问题描述】:
我是 android studio 新手,我安装了一个新版本(版本 1.5.1)。 出于某种原因,我不断收到一条错误消息(每次我使用应用程序主题时),说存在渲染问题:缺少样式。 我在网上寻找解决方案,但大多数都已过时或根本不起作用。
感谢您的帮助。
清单文件:
<?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>
构建等级:
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'
}
【问题讨论】:
-
我已经看过这个页面,但是它已经过时了并且在我的android studio (1.5.1)版本中不能工作
-
@Yaron 在预览窗口中尝试使用 AppCompat 主题。
-
我仍然得到一个错误。
标签: android android-studio android-theme