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

时间:2018-11-26 16:41:39

标签: 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
}

2 个答案:

答案 0 :(得分:0)

错误和如何解决的问题写在您的堆栈跟踪中:

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

答案 1 :(得分:0)

现在这样的错误:

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\admin\AppData\Local\Android\sdk\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1