首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >找不到类android.view.autofill.AutofillManager

找不到类android.view.autofill.AutofillManager
EN

Stack Overflow用户
提问于 2018-09-13 14:08:14
回答 1查看 1.1K关注 0票数 1

我的停止了在这些Android版本4.2.2、4.3、4.4.2上的工作,奇怪的是,它在4.4.4上工作,而且我没有在本机代码中改变任何东西,甚至没有实现任何新特性,它只是在尝试构建一个旧的工作版本时停止了对新版本的工作。

日志给了我两个错误,无法找到任何解决方案:

代码语言:javascript
复制
E/dalvikvm: Could not find class 'android.view.autofill.AutofillManager', referenced from method com.facebook.internal.Utility.isAutofillAvailable

E/com.facebook.internal.AttributionIdentifiers: getAttributionIdentifiers should not be called from the main thread

这是我的build.gradle:

代码语言:javascript
复制
def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion 27
    buildToolsVersion "27.0.3"

    defaultConfig {
        applicationId "appname"
        minSdkVersion 17
        targetSdkVersion 27
        versionCode 1199
        versionName "3.2.5"
        vectorDrawables.useSupportLibrary = true
        // Enabling multidex support.
        multiDexEnabled true
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            signingConfig signingConfigs.release
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                    versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

buildscript {
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'
        classpath 'com.google.gms:google-services:3.2.1'
    }
}


configurations.all {
    resolutionStrategy {
        force 'org.webkit:android-jsc:r216113'
    }
}

dependencies {
    implementation project(':appcenter')
    implementation project(':appcenter-crashes')
    implementation project(':react-native-blur')
    implementation project(':react-native-i18n')
    implementation project(':react-native-fbsdk')
    implementation project(':react-native-sound')
    implementation project(':react-native-audio')
    implementation project(':react-native-config')
    implementation project(':react-native-svg')
    implementation project(':react-native-picker')
    implementation project(':react-native-sentry')
    implementation project(':react-native-restart')
    implementation project(':react-native-firebase')
    implementation project(':react-native-intercom')
    implementation project(':react-native-code-push')
    implementation project(':react-native-fetch-blob')
    implementation project(':react-native-device-info')
    implementation project(':react-native-image-picker')
    implementation project(':react-native-open-notification')
    implementation project(':react-native-sensors')
    implementation project(':react-native-linear-gradient')
    implementation project(':react-native-image-crop-picker')
    implementation project(':react-native-exception-handler')
    implementation project(':react-native-flag-secure-android')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:27.1.1"
    implementation "com.facebook.react:react-native:+"
    implementation 'com.android.support:multidex:1.0.3'

    implementation 'io.intercom.android:intercom-sdk-base:5.+'
    implementation 'io.intercom.android:intercom-sdk-fcm:5.+'

    implementation 'com.google.firebase:firebase-core:16.0.3'
    implementation "com.google.firebase:firebase-auth:16.0.3"
    implementation "com.google.firebase:firebase-database:16.0.2"
    implementation 'com.google.firebase:firebase-messaging:17.3.1'
    implementation "com.google.firebase:firebase-storage:16.0.2"
    implementation 'me.leolin:ShortcutBadger:1.1.21@aar'
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

// Apply Google services's GMS plug-in.
apply plugin: 'com.google.gms.google-services'

有人能帮我或指点我解决这个问题的方向吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-09-14 15:10:26

我找到了解决方案,修改你的android/build.gradle

代码语言:javascript
复制
allprojects {
    repositories {
    // ...

    configurations.all {
        resolutionStrategy {
            force 'com.facebook.android:facebook-android-sdk:4.34.0'
        }
    }
}

原始答案:https://stackoverflow.com/a/52148465/1216601

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52315552

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档