Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/192.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android中的依赖性问题_Android_Firebase - Fatal编程技术网

android中的依赖性问题

android中的依赖性问题,android,firebase,Android,Firebase,使用firebase Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.google.firebase:firebase-auth:19.2.0] C:\Users\Shazail Malik\.gradle\caches\transforms-2\files-2.1\7c78a11c6b4a4456334831db07970

使用
firebase

Manifest merger failed :
uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library 
[com.google.firebase:firebase-auth:19.2.0] C:\Users\Shazail Malik\.gradle\caches\transforms-2\files-2.1\7c78a11c6b4a4456334831db0797030d\firebase-auth-19.2.0
\AndroidManifest.xml as the library might be using APIs not available in 15
建议:使用minSdk最多为15的兼容库, 或者将该项目的minSdk版本至少增加到16,
或者使用
工具:overrideLibrary=“com.google.firebase.auth”
强制使用(可能导致运行时失败)

您的答案在错误日志中

解决方案:

  • 在清单文件中将sdk:minSdkVersion设置为16或更高版本

  • 工具:overrideLibrary=“com.google.firebase.auth”


  • 对于第二种解决方案,请尽量避免,因为它可能会在运行时导致崩溃。

    要使用最新的Firebase库,最低API级别应为16

    确保您的应用程序满足以下要求:

    • 目标API级别16(果冻豆)或更高版本
    • 使用Gradle 4.1或更高版本
    查看更多详细信息。

    gradle脚本下打开
    build.gradle(模块:app)

    您的
    minSdkVersion
    是15

    defaultConfig {
        minSdkVersion 15
    }
    
    像这样把它改成16

    defaultConfig {
        minSdkVersion 16
    }
    

    如果您想包括
    使用sdk:minSdkVersion=14
    ,则必须将依赖关系降级为
    com.google.firebase:firebase auth:16.0.5
    ,因为这允许使用
    min-sdk-14

    但这不是推荐的解决方案。您应该始终在项目中使用最新的依赖项,就像在最新版本的google aways中添加一些新功能或方法以在应用程序中使用一样

    有关最新版本,请查看

    有关firebase身份验证,请检查