web-dev-qa-db-fra.com

Facebook n'a pas de traduction par défaut

J'ai eu cette erreur aujourd'hui en essayant de lancer une application avec le SDK de Facebook attaché. 

Warning:string 'com_facebook_smart_login_confirmation_continue_as_f1gender' has no default translation.
Warning:string 'com_facebook_loginview_log_out_action_f1gender' has no default translation.
Warning:string 'com_facebook_loginview_log_in_button_continue_f1gender' has no default translation.
Warning:string 'com_facebook_smart_login_confirmation_continue_as_m2gender' has no default translation.
Warning:string 'com_facebook_loginview_log_out_button_m2gender' has no default translation.
Warning:string 'com_facebook_loginview_log_out_action_m2gender' has no default translation.
Warning:string 'com_facebook_share_button_text_m2gender' has no default translation.
Warning:string 'com_facebook_loginview_logged_in_as_f1gender' has no default translation.
Warning:string 'com_facebook_send_button_text_m2gender' has no default translation.
Warning:string 'com_facebook_smart_login_confirmation_cancel_m2gender' has no default translation.
Warning:string 'com_facebook_loginview_logged_in_using_facebook_m2gender' has no default translation.
Warning:string 'com_facebook_loginview_log_out_button_f1gender' has no default translation.
Warning:string 'com_facebook_send_button_text_f1gender' has no default translation.
Warning:string 'com_facebook_loginview_logged_in_as_m2gender' has no default translation.
Warning:string 'com_facebook_smart_login_confirmation_cancel_f1gender' has no default translation.
Warning:string 'com_facebook_loginview_logged_in_using_facebook_f1gender' has no default translation.
Warning:string 'com_facebook_share_button_text_f1gender' has no default translation.
Warning:string 'com_facebook_loginview_log_in_button_continue_m2gender' has no default translation.
Warning:string 'com_facebook_smart_login_confirmation_title_f1gender' has no default translation.
Warning:string 'com_facebook_smart_login_confirmation_title_m2gender' has no default translation.
Warning:string 'com_facebook_tooltip_default_f1gender' has no default translation.
Warning:string 'com_facebook_tooltip_default_m2gender' has no default translation.
Error:Error converting bytecode to dex:
Cause: Java.lang.RuntimeException: Exception parsing classes
Error:1 error; aborting
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.Android.build.api.transform.TransformException: Java.lang.RuntimeException: com.Android.ide.common.process.ProcessException: Java.util.concurrent.ExecutionException: com.Android.ide.common.process.ProcessException: Return code 1 for dex process
Information:BUILD FAILED

J'essaie de comprendre pourquoi mais je n'ai pas essayé de demander une autre langue que l'anglais. En cas de besoin, voici mon application Gradle:

apply plugin: 'com.Android.application'

Android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId ".chillout"
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "Android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-Android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.Android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.Android.support', module: 'support-annotations'
    })
    compile 'com.Android.support:appcompat-v7:25.1.1'
    compile 'com.Android.support:design:25.3.1'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    compile 'com.google.firebase:firebase-database:10.0.0'
    compile 'com.google.firebase:firebase-storage:10.0.0'
    compile 'com.google.firebase:firebase-messaging:10.0.0'
    compile 'com.facebook.Android:facebook-Android-sdk:[4,5)'
    compile 'com.firebaseui:firebase-ui-database:1.2.0'
    compile 'com.Android.support:cardview-v7:25.3.0'
    compile 'com.Android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

Et voici mon projet Gradle.

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.Android.tools.build:gradle:2.3.3'
        classpath 'com.google.gms:google-services:3.0.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter {
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Je vous remercie!

22
I'l Follio

(À compter du 11 juillet 2017)

Revenir à la version précédente, qui est 4.23.0, semble bien fonctionner. C'est à dire.

    compile 'com.facebook.Android:facebook-Android-sdk:4.23.+'

La dernière version 4.24.0 semble poser problème à plusieurs égards, à la fois sur Android et sur iOS.

18
mojuba

J'ai eu les mêmes avertissements com_facebook lors de la construction de mon application, mais sans les erreurs. Donc, je suppose que les avertissements et les erreurs ne sont pas liés les uns aux autres. 

Dans tous les cas, je me suis débarrassé des avertissements com_facebook en ajoutant un fichier res/values/facebook-strings.xml contenant les éléments suivants:

<?xml version="1.0" encoding="utf-8"?>
<resources>
  <string name="com_facebook_loginview_log_in_button_continue_f1gender">Continue</string>
  <string name="com_facebook_loginview_log_in_button_continue_m2gender">Continuee</string>
  <string name="com_facebook_loginview_log_out_action_f1gender">Log out</string>
  <string name="com_facebook_loginview_log_out_action_m2gender">Log out</string>
  <string name="com_facebook_loginview_log_out_button_f1gender">Log out</string>
  <string name="com_facebook_loginview_log_out_button_m2gender">Log out</string>
  <string name="com_facebook_loginview_logged_in_as_f1gender">Logged in as</string>
  <string name="com_facebook_loginview_logged_in_as_m2gender">Logged in as</string>
  <string name="com_facebook_loginview_logged_in_using_facebook_f1gender">Logged in using Facebook</string>
  <string name="com_facebook_loginview_logged_in_using_facebook_m2gender">Logged in using Facebook</string>
  <string name="com_facebook_send_button_text_f1gender">Send</string>
  <string name="com_facebook_send_button_text_m2gender">Send</string>
  <string name="com_facebook_share_button_text_f1gender">Share</string>
  <string name="com_facebook_share_button_text_m2gender">Share</string>
  <string name="com_facebook_smart_login_confirmation_cancel_f1gender">Cancel</string>
  <string name="com_facebook_smart_login_confirmation_cancel_m2gender">Cancel</string>
  <string name="com_facebook_smart_login_confirmation_continue_as_f1gender">Continue</string>
  <string name="com_facebook_smart_login_confirmation_continue_as_m2gender">Continue</string>
  <string name="com_facebook_smart_login_confirmation_title_f1gender">Confirm</string>
  <string name="com_facebook_smart_login_confirmation_title_m2gender">Confirm</string>
  <string name="com_facebook_tooltip_default_f1gender">Default</string>
  <string name="com_facebook_tooltip_default_m2gender">Default</string>
</resources>

Pas sûr que les "traductions par défaut" ci-dessus aient un sens, mais je ne les ai jamais vues de toute façon. (Les avertissements étaient le résultat d'un plugin Cordova que je ne voulais pas déranger).

8
user2288476

Xamarin.Facebook.Android 4.26.0 a résolu le problème

1
Marco