当我在android manifest.xml中添加权限时,我的应用程序停止
当我在android manifest.xml中添加权限时,我正在处理谷歌地图,现在我的应用程序已经停止。 在此之前,我的应用程序运行良好。 我启用了当我在android manifest.xml中添加权限时,我的应用程序停止,android,Android,当我在android manifest.xml中添加权限时,我正在处理谷歌地图,现在我的应用程序已经停止。 在此之前,我的应用程序运行良好。 我启用了multiDexEnabled true。这样做可以消除此错误,但我的应用程序仍会停止。请帮帮我,我在这上面花了很多时间,但是不能 gradle.build apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "24.
multiDexEnabled true
。这样做可以消除此错误,但我的应用程序仍会停止。请帮帮我,我在这上面花了很多时间,但是不能
gradle.build
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.shah.myapplication1"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services:9.6.1'
}
这是我添加的许可
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
我注意到这次事故与Firebase有关。尝试将此项添加到你的应用程序级别
build.gradle
的依赖项下:
compile 'com.google.firebase:firebase-core:10.0.1'
并将其放在应用程序级别的底部build.gradle
:
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'
另请参见:您的多索引配置将面临挑战。请浏览以下连结-
请特别注意multidexkeepfile和multidexkeepproguardconfig您的stacktrace在哪里?同意,请编辑您的原始帖子以包含日志,以便我们可以看到崩溃发生的地方。@MichaelDodd请查看catlog并感谢您的帮助
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'