Partage
  • Partager sur Facebook
  • Partager sur Twitter

[Android studio] Problème de ressource/dépendance

    27 mars 2020 à 13:15:30

    Bonjour à tous, il y deux jours maintenant, mon android stduio ne trouve plus la class "R" généré normalement automatiquement ..

    Voici l'erreur:

    F:\DataHosting\ApplicationV2\app\src\main\java\fr\ph1823\datahosting\SplashScreen.java:79: error: cannot find symbol
            setContentView(R.layout.activity_splash_screen);
                            ^
      symbol:   variable layout
      location: class R

    J'ai tout tenté, invalid cache, and restart, sync gradle, sync file, j'ai vérifier toutes les ressources, j'ai regardé toutes les solutions donné sur stackoverflow, et d'autre forum d'entre aide.

    J'ai donc mis une ancienne version de mon gradle, et j'ai remarqué que quand j'enlever cette ligne

    implementation 'com.google.firebase:firebase-firestore:21.4.1'

    Ca faisait tout planté. 

    J'ai même désintaller Android Studio, vidéo le .gradle présent dans C:\Users\ph1823 , bref je ne sais plus quoi faire, donc je pose ma question ici, peut être qu'une personne pourra m'aider.

    Des idée de solution ?

    Voici mon gradle.build:

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 29
        defaultConfig {
            applicationId "fr.ph1823.datahosting"
            minSdkVersion 19
            targetSdkVersion 29
            versionCode 19
            versionName "Bêta 1.3.1"
            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
            multiDexEnabled true
            resConfigs ''// add this to enable multi-dex
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            }
        }
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
        buildToolsVersion = '29.0.3'
    }
    
    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'androidx.appcompat:appcompat:1.1.0'
        implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
        implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
        implementation 'androidx.legacy:legacy-support-v4:1.0.0'
        implementation 'com.google.android.material:material:1.1.0'
        implementation 'androidx.annotation:annotation:1.1.0'
        implementation 'androidx.recyclerview:recyclerview:1.1.0'
        implementation 'androidx.preference:preference:1.1.0'
        testImplementation 'junit:junit:4.13'
        androidTestImplementation 'androidx.test:runner:1.2.0'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
        implementation 'com.google.android.gms:play-services-base:17.2.0'
        implementation 'com.google.android.gms:play-services-ads:19.0.1'
        implementation 'com.google.firebase:firebase-ads:19.0.1'
        implementation 'com.google.firebase:firebase-auth:19.3.0'
        implementation 'com.google.firebase:firebase-firestore:21.4.1'
    
        //CMP Conset
        implementation 'com.google.android.ads.consent:consent-library:1.0.8'
    
        //5d02668acf7fcd0018c24d25
        //compile 'com.github.vungle:vungle-android-sdk:6.2.5'
        // Vungle SDK
        implementation 'com.google.ads.mediation:vungle:6.4.11.1'
    
        //AdCollony
        implementation 'com.adcolony:sdk:4.1.0'
        implementation 'com.google.ads.mediation:adcolony:4.1.0.0'
    
        //TapJoy
        api 'com.tapjoy:tapjoy-android-sdk:12.4.2@aar'
        implementation 'com.google.ads.mediation:tapjoy:12.4.2.0'
    
        //MoPub
       /* implementation('com.mopub:mopub-sdk:@aar') {
            transitive = true
        }*/
    
        implementation 'com.google.ads.mediation:mopub:5.11.1.0'
    
        //AppLovin
        implementation "com.applovin:applovin-sdk:9.8.0"
        implementation 'com.google.ads.mediation:applovin:9.8.0.0'
    
        //InMobi
        implementation 'com.inmobi.monetization:inmobi-ads:9.0.1'
    
        implementation 'com.google.ads.mediation:inmobi:7.3.0.0'
    
        //IronSource
        implementation 'com.ironsource.sdk:mediationsdk:6.15.0.1@jar'
        implementation 'com.google.ads.mediation:ironsource:6.14.0.1.0'
    
        // Optional Google Play Services - Location and Basement
        implementation 'com.google.android.gms:play-services-basement:17.2.0'
        implementation 'com.google.android.gms:play-services-location:17.0.0'
    
    
        //Chart boost
        implementation 'com.chartboost:chartboost-sdk:8.0.2'
        implementation 'com.google.ads.mediation:chartboost:7.5.0.0'
    
        //FaceBook
        //Audience Network SDK
        implementation 'com.facebook.android:audience-network-sdk:5.7.1'
        implementation 'com.facebook.android:facebook-android-sdk:6.3.0'
    
    }
    
    
    apply plugin: 'com.google.gms.google-services'  // Google Play services Gradle plugin
    
    

    Merci de votre aide !





    • Partager sur Facebook
    • Partager sur Twitter

    Bien à vous, ph1823.

    [Android studio] Problème de ressource/dépendance

    × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
    × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
    • Editeur
    • Markdown