facebook / facebook-sdk-for-unity

The facebook sdk for unity.
https://developers.facebook.com/docs/unity
Other
486 stars 257 forks source link

Build failure: support-v4-23.4.0.aar missing #84

Open markshep opened 7 years ago

markshep commented 7 years ago

I'm trying to build the SDK, but it fails like this:

$ scripts/setup.sh
checking packages...
All packages listed in packages.config are already installed.
checking packages done.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 79.9M  100 79.9M    0     0  2691k      0  0:00:30  0:00:30 --:--:-- 2059k
Starting build 
Step 1 - Cleaning wrapper libs folder 
~/code/facebook-sdk-for-unity/facebook-android-wrapper/libs ~/code/facebook-sdk-for-unity
find: warning: you have specified the -maxdepth option after a non-option argument !, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

~/code/facebook-sdk-for-unity
Step 2 - Get dependencies for android wrapper 
Step 2.1.0 - Download bolts-android-1.4.0.jar 
bolts-android-1.4.0.jar already exists. Skipping download. 
Step 2.1.1 - Download bolts-tasks-1.4.0.jar 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   178  100   178    0     0    827      0 --:--:-- --:--:-- --:--:--   839
100   190  100   190    0     0    292      0 --:--:-- --:--:-- --:--:--     0
100 38092  100 38092    0     0  35336      0  0:00:01  0:00:01 --:--:-- 35336
Step 2.1.2 - Download bolts-applinks-1.4.0.jar 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   178  100   178    0     0    825      0 --:--:-- --:--:-- --:--:--   835
100   196  100   196    0     0    300      0 --:--:-- --:--:-- --:--:--     0
100 25020  100 25020    0     0  28767      0 --:--:-- --:--:-- --:--:-- 28767
Step 2.2 - Download facebook-android-sdk-4.17.0.aar 
facebook-android-sdk-4.17.0.aar already exists. Skipping download 
Step 2.3 - Coping support lib 
cp: cannot stat '/Users/mark/android/sdk/extras/android/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.aar': No such file or directory

FATAL: Failed to copy '/Users/mark/android/sdk/extras/android/m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.aar' 

FATAL: Failed to build the android sdk plugin 

How can I fix that?

markshep commented 7 years ago

I've managed to work out the answer - I needed to run the following:

$ANDROID_HOME/tools/bin/sdkmanager "extras;android;m2repository"

Please could the Android SDK packages that are required be mentioned in the instructions in README.mdown and the script be made to check for these required packages up front and issue a meaningful error message if any are missing?