Конфигурация 'compile' устарела и была заменена на 'реализация' и 'api'. ПРЕДУПРЕЖДЕНИЕ - PullRequest
0 голосов
/ 20 июня 2019

Итак, у меня проблема с моим кодом компиляции. Я изменил все правильно в реализации, но я все еще продолжаю получать эту ошибку.

Я пытался изменить версию и компиляцию на API, но я не понимаю, что все-таки идет не так.

Предупреждение = КАРТИНА

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'
    defaultConfig {
        applicationId "com.example.gebruiker.GIPAPP"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:exifinterface:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    api 'com.google.firebase:firebase-core:15.0.0'
    api 'com.google.firebase:firebase-auth:15.0.0'
    api 'com.google.firebase:firebase-database:15.0.0'
    api 'com.google.firebase:firebase-storage:15.0.0'
    implementation 'com.squareup.picasso:picasso:2.71828'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

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

Конфигурация 'compile' устарела и была заменена на 'реализация' и 'api'.

Ответы [ 2 ]

0 голосов
/ 20 июня 2019

Ошибка / предупреждение, которое я получаю сейчас, является следующей после изменения некоторых версий.Изменено все до последних версий.

package="com.example.gebruiker.gipapp">

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".SecondActivity"></activity>
    <activity android:name=".RegistrationActivity"></activity>
    <activity android:name=".PasswordActivity"></activity>
    <activity android:name=".ProfileActivity"></activity>
    <activity android:name=".UpdateProfile"></activity>
    <activity android:name=".UpdatePassword"></activity>
    <activity android:name=".ActivityProfile"></activity>
</application>

Ошибка слияния манифеста: Атрибут application @ appComponentFactory value = (android.support.v4.app.CoreComponentFactory) из [com.android.support:support-compat: 28.0.0] AndroidManifest.xml: 22: 18-91 также присутствует в [androidx.core: core: 1.0.0] AndroidManifest.xml: 22: 18-86 value = (androidx.core.app.CoreComponentFactory).Предложение: добавьте 'tools: replace = "android: appComponentFactory"' к элементу на AndroidManifest.xml: 8: 5-29: 19, чтобы переопределить.

0 голосов
/ 20 июня 2019

Отметьте один вариант здесь (чтобы добавить базу).Зависимости firebase являются реализацией ... https://firebase.google.com/docs/android/setup

Возможно, вы поставили другую вещь и gradle автоматически изменил ее на api, что не так.Итак, измените слова API для реализации

...