Ошибок в андроид студио нет, только когда запускаеш приложение на емуляторе.
преддыдущий пост - где я подключал материал - диалог. Чистел и ребилдел - непомогло.
Gradle*
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.whitestar.successstudent"
minSdkVersion 9
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.1.0'
compile('com.afollestad.material-dialogs:core:0.8.4.2@aar') {
transitive = true
}
//materialDialogs
repositories {
maven { url "https://jitpack.io" }
}
}
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- The main content view -->
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/headerbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/toolbar" />
</LinearLayout>
<LinearLayout
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
</LinearLayout>
</FrameLayout>
<!-- The navigation drawer -->
<ListView
android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#fff"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp" />
</android.support.v4.widget.DrawerLayout>
Строка с ошибками:
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: FATAL EXCEPTION: main
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.whitestar.successstudent/com.whitestar.successstudent.activities.MainActivity}: java.lang.IllegalArgumentException: AppCompat does not support the current theme features: { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay: false, windowNoTitle: false }
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.app.ActivityThread.access$600(ActivityThread.java:130)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:137)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:4745)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:511)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: Caused by: java.lang.IllegalArgumentException: AppCompat does not support the current theme features: { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay: false, windowNoTitle: false }
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:423)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:280)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:254)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at com.whitestar.successstudent.activities.MainActivity.onCreate(MainActivity.java:82)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:5008)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.app.ActivityThread.access$600(ActivityThread.java:130)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:137)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:4745)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:511)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
10-26 23:08:58.744 14019-14019/? E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
10-26 23:10:48.980 14019-14023/com.whitestar.successstudent D/dalvikvm: GC_CONCURRENT freed 255K, 9% free 8141K/8903K, paused 1ms+1ms, total 6ms
styles.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="colorPrimary">@color/primary_color</item>
<item name="colorPrimaryDark">@color/primary_color_dark</item>
<item name="colorAccent">@color/accent_color</item>
<item name="drawerArrowStyle">@style/DrawerArrowStyle</item>
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:textColorPrimary">@android:color/white</item>
<item name="android:textColorSecondary">@android:color/white</item>
<item name="actionMenuTextColor">@android:color/white</item>
<item name="android:textColor">@color/text</item>
</style>
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
<item name="color">@android:color/white</item>
</style>
</resources>
StackTrace
с подробной инфой об ошибке. Выложите их целиком текстом. – ЮрийСПб♦ 26 окт '15 в 23:10styles.xml
в вопрос. – ЮрийСПб♦ 26 окт '15 в 23:20