Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity Facebook SDK export Android studio, gradle build error No Resource found

Discussion in 'Android' started by Shadowagv, Jun 14, 2016.

  1. Shadowagv

    Shadowagv

    Joined:
    Oct 6, 2011
    Posts:
    32
    Hi,

    In empty project i import facebook unity sdk (from official facebook site).

    Then i make Build apk with test scene (facebook sdk test scene) and instal on device - all run good.

    But when i try export to andorid project and import it to Android studio i get error on gradle build:

    "No resource identifier found for attribute 'cardElevation' in package 'com.facebook' "
     
  2. Shadowagv

    Shadowagv

    Joined:
    Oct 6, 2011
    Posts:
    32
    Unity version 5.3.5f1
    Android sdk: 23
     
  3. perfectlove

    perfectlove

    Joined:
    Jul 14, 2016
    Posts:
    1
    @Shadowagv, I have same issue.
    did you solve this?
     
  4. MaxFrax96

    MaxFrax96

    Joined:
    Nov 18, 2012
    Posts:
    11
    Same issue here, any solution?
     
  5. FlorianTuttiFrutti

    FlorianTuttiFrutti

    Joined:
    Sep 29, 2016
    Posts:
    13
    I solved this problem this way:
    • In Android Studio, open the build.gradle of the facebookandroidsdkXXX project
    • In dependencies, add this code
      Code (CSharp):
      1. compile project(':cardviewvXXXX')
      . Just replace the XXX by the corresponding digits.
    Now if you build, the error should be gone :)
     
  6. Bunker8

    Bunker8

    Joined:
    Feb 8, 2016
    Posts:
    3
    Hi, after I put 'compile project (': cardviewvXXXX ')' in the build.grandle of the facebookandroidsdkXXX project.

    I get the following error:
    " Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Landroid / support / v7 / cardview / BuildConfig; "

    Any solution?
    Thanks