android - 编译 'com.firebaseui:firebase-ui-storage:4.0.0'错误

标签 android gradle

在我的Gradle中添加此存储库时,出现错误。
我尝试建立到云并得到此错误

apply plugin: 'com.android.application'
android {
        compileSdkVersion 23
        buildToolsVersion "23.0.1"

        defaultConfig {
            applicationId "com.mkurbanov.future"
            minSdkVersion 14
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:23.0.1'
        compile 'com.google.firebase:firebase-core:16.0.1'
        compile 'com.google.firebase:firebase-storage:16.0.4'
        compile 'com.firebaseui:firebase-ui-storage:4.1.0'
    }

    apply plugin: 'com.google.gms.google-services'*

错误:
 Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugAndroidTestSources]
    Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
    Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
    :app:preBuild UP-TO-DATE
    :app:preDebugBuild UP-TO-DATE
    :app:checkDebugManifest
    :app:preReleaseBuild UP-TO-DATE
    :app:prepareAndroidArchCoreRuntime110Library UP-TO-DATE
    :app:prepareAndroidArchLifecycleLivedataCore110Library UP-TO-DATE
    :app:prepareAndroidArchLifecycleRuntime110Library UP-TO-DATE
    :app:prepareAndroidArchLifecycleViewmodel110Library UP-TO-DATE
    :app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCompat2711Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCoreUi2711Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCoreUtils2711Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportFragment2711Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportMediaCompat2711Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportV42711Library UP-TO-DATE
    :app:prepareComFirebaseuiFirebaseUiStorage410Library UP-TO-DATE
    :app:prepareComGithubBumptechGlideGifdecoder471Library UP-TO-DATE
    :app:prepareComGithubBumptechGlideGlide471Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesAdsIdentifier1501Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesBase1601Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesBasement1601Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesMeasurementBase1600Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesStats1501Library UP-TO-DATE
    :app:prepareComGoogleAndroidGmsPlayServicesTasks1601Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseAnalytics1601Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseAnalyticsImpl1611Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseCommon1603Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseCore1601Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseIid1600Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseIidInterop1600Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseMeasurementConnector1600Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseMeasurementConnectorImpl1601Library UP-TO-DATE
    :app:prepareComGoogleFirebaseFirebaseStorage1604Library UP-TO-DATE
    :app:prepareDebugDependencies
    :app:compileDebugAidl UP-TO-DATE
    :app:compileDebugRenderscript
    :app:generateDebugBuildConfig UP-TO-DATE
    :app:generateDebugAssets UP-TO-DATE
    :app:mergeDebugAssets UP-TO-DATE
    :app:generateDebugResValues UP-TO-DATE
    :app:processDebugGoogleServices
    Parsing json file: C:\Users\admin\AndroidStudioProjects\Future\app\google-services.json
    :app:generateDebugResources
    :app:mergeDebugResources UP-TO-DATE
    :app:processDebugManifest
    C:\Users\admin\AndroidStudioProjects\Future\app\src\main\AndroidManifest.xml Error:
        uses-sdk:minSdkVersion 14 cannot be smaller than version 16 declared in library [com.firebaseui:firebase-ui-storage:4.1.0] C:\Users\admin\AndroidStudioProjects\Future\app\build\intermediates\exploded-aar\com.firebaseui\firebase-ui-storage\4.1.0\AndroidManifest.xml
        Suggestion: use tools:overrideLibrary="com.firebase.ui.storage" to force usage
    Error:Execution failed for task ':app:processDebugManifest'.
    > Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 16 declared in library [com.firebaseui:firebase-ui-storage:4.1.0] C:\Users\admin\AndroidStudioProjects\Future\app\build\intermediates\exploded-aar\com.firebaseui\firebase-ui-storage\4.1.0\AndroidManifest.xml
        Suggestion: use tools:overrideLibrary="com.firebase.ui.storage" to force usage
    Information:BUILD FAILED
    Information:Total time: 15.324 secs
    Information:1 error
    Information:0 warnings
    Information:See complete output in console

构建脚本:
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'
        classpath 'com.google.gms:google-services:4.0.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

最佳答案

该错误及其解决方法写在您的stacktrace中:

uses-sdk:minSdkVersion 14 cannot be smaller than version 16 declared in library [com.firebaseui:firebase-ui-storage:4.1.0] C:\Users\admin\AndroidStudioProjects\Future\app\build\intermediates\exploded-aar\com.firebaseui\firebase-ui-storage\4.1.0\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.firebase.ui.storage" to force usage

关于android - 编译 'com.firebaseui:firebase-ui-storage:4.0.0'错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53485517/

相关文章:

git - 我到底应该把 .GitIgnore 文件放在 Android Studio 项目中的什么地方

android - 使用 keytool 构建的每个 .keystore 文件是否都是唯一的?

java - 在 Android 中初始化 native 库状态的正确方法

android - Dagger 2 Android 子组件覆盖

android - 如何在 Android 3.0 上显示菜单按钮?

android - ProcessException:aapt完成,退出值非零2

android - 如何准备混淆文件以及其中包含的内容?

android - 将复杂对象从 Activity 传递到 fragment 对话框,反之亦然

android - Android AES加密的Node js等效代码

android - 使用 resConfig 为 Android 风格强制语言环境