你在
android.support.v4.widget.drawerlayout获得
NullPointerException
NullPointerException is thrown when an application attempts to use an
object reference that has the null value.
NullPointerException如何仅在版本apk上启动?
When you prepare your application for release, you configure, build,
and test a release version of your application. The configuration
tasks are straightforward, involving basic code cleanup and code
modification tasks that help optimize your application.
>阅读Prepare for Release
> set minifyEnabled false
你可以像这样自定义你的build.gradle
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
zipAlignEnabled true
jniDebuggable false
renderscriptDebuggable false
}
}
确保使用稳定的支持库和构建工具.
compileSdkVersion 24
buildToolsVersion "24.0.2"
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:design:24.2.0'
项目级别
classpath 'com.android.tools.build:gradle:2.1.2' // or 2.2.2
然后
On the main menu, choose File | Invalidate Caches/Restart. The
Invalidate Caches message appears informing you that the caches will
be invalidated and rebuilt on the next start. Use buttons in the
dialog to invalidate caches, restart Android Studio .
注意:您可以为我们提供您的build.gradle.禁用“即时运行”设施.
.