0

So I have an issue with my compile code. I changed everything the right way to implementation but I still keep on getting this error.

I have tried to change the Version and the compile to API but I don't understand what still goes wrong.

Warning = PICTURE

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'

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.

  • That should be a warning, not an error. Its safe to ignore. Its coming from one of your dependencies. – Gabe Sechan Jun 20 '19 at 19:14
  • You still have one or more 'compile', somewhere in your module dependencies, if you have one. Sync the project and rebuild and see if it goes away. – The_Martian Jun 20 '19 at 19:23
  • @The_Martian Check my project. No compiles been found only the compile.java but I think thats a standard file. – Jason Lommelen Jun 20 '19 at 19:37
  • @Jason Lommelen, hover over the red circle left of the red squiggly line of appCompat dependency and update it. Sync and rebuild your project. – The_Martian Jun 20 '19 at 19:57

2 Answers2

0

Check option one here (to add firebase). The firebase dependencies are implementation... https://firebase.google.com/docs/android/setup

Probably you put another thing and gradle changed it to api automatically, what is not ok. So, change the api words to implementation

Lenin
  • 500
  • 3
  • 11
0

The error/warning I get now is the next after changing some versions. Changed it all to the latest versions.

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>

Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:8:5-29:19 to override.