Motivation:
I am doing project and making an app in which after login I need to switch to Navigation Drawer Activity. But whenever I was adding a Navigation Drawer in my project the activity_navigation was always showing a rendering problem.
Problem:
After many hours I tried to make a new project, and then added only "Navigation Drawer Activity" the problem was still there in Rendering.
ScreenShot:
This is what i am getting by creating a new project having a simple "Navigation Drawer Activity".
This Rendering Problem only exists in main_navigation.xml and not in fragment_navigation.xml and fragment_navigation_drawer.xml
Check List:
Please note that - Android Support Repository - Android Support Library ALL are added.
Help:
There are many solutions available on siteS, blogs and even stackoverflow saying to change the build.graddle file and so on. I tried many solutions but couldn't find a satisfactory one. Please Help me in that regard.
I'm having the same problem with Android Studio 1.2 and I've tried a lot of things but any of them works
For me the solution was to use the Canary Channel and update Android Studio to 1.3.
Now I have this version and it works perfect but this is not and stable version
My build.grade is in this way
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '21.1.2'
defaultConfig {
applicationId "com.androidtest.materialdesign"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
}
This is the problem with Android Studio 1.2
and the same code with Android 1.3 is this
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.