Unity Facebook SDK v 7.7 and Google Play Services - unity3d

B.S: I am specifically talking about facebook-unity-sdk-7.7.0 not v 7.3.0
I am using facebook-unity-sdk-7.7.0 and GooglePlayGamesPlugin-0.9.32 in my project. It does not let me build for android and fails with error Unable to convert classes into dex format. See the Console for details.. In Facebook SDK 7.3.0 it works by deleting android support v4, but in 7.7 the same thing does not work.

I had the same problem and this was the way I solved it:
Delete the following files from the folder:
\ Assets \ FacebookSDK \ Plugins \ Android \ libs:
support-annotations-23.4.0.jar
support-annotations-23.4.0.meta
support-v4-23.4.0.aar
support-v4-23.4.0.meta

Related

Using DocC for an Objective-C project

I am working on an Objective-C library, that is also available via Swift Package Manager, namely Sentry. We want to generate API docs using DocC, but I am running into the problem where when I generate the documentation I get this error:
error: target 'Sentry' is not a Swift source module
Weirdly enough when I build the documentation within Xcode itself (Product -> Build Documentation) it works perfectly well.
This is the command I am using on the command line to try to generate the docs:
swift package \
generate-documentation \
--allow-writing-to-directory ./docs \
--target Sentry \
--output-path ./docs \
--transform-for-static-hosting \
--hosting-base-path Sentry
And our Package.swift can be found here.
So why is it that Xcode can generate the docs perfectly fine, but I can't do it using swift-docc-plugin?

MongoDB Realm React Native SDK with Expo - Missing Realm Constructor error

According to the latest documentation for MongoDB Realm React Native, it states that their SDK is compatible with Expo...
Expo now supports Realm with the Expo SDK version 44. To use Realm
with Expo, upgrade to Expo SDK version 44. Realm does not work with
earlier versions of Expo.
We have installed Expo and have the latest version of their SDK, however no matter what we try we get an error stating "Missing Ream Constructor":
We require the project to be in the Expo managed workflow and not the bare workflow. When we setup in bare workflow, it works.
Are we missing something??
Some of the settings I made to fix:
REMEMBER: react-native-reanimated doesn't work with Realm & Expo
Following the documentation
Rather than run with expo start or npx react-native [platform] run yarn android for iOS or yarn ios
Install Java SDK version 8
Uninstall react-native: npm uninstall -g react-native and run npx react-native run-android
If you got this error:
A problem occurred configuring project ':realm'.
Could not create task ':realm:compileDebugJavaWithJavac'.
Could not create task ':realm:forwardDebugPort'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at 'C:\Users\yourUser\Desktop\Projects\MyAwesomeRealmApp\android\local.properties'.
`
To fix this:
Create a file with the name local.properties in android directory
Open the file and paste your Android SDK path like below: sdk.dir=C:\\Users\\UserName\\AppData\\Local\\Android\\sdk

Ionic add platform ios showing phonegap-plugin-push error on mac OS Sierra

Hi when i tried to platform add ios showing the following error,
Adding ios project...
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: com.leniko.fuel-buddy
Name: Fuel Buddy
iOS project created with cordova-ios#4.4.0
Installing "cordova-plugin-app-version" for ios
Installing "cordova-plugin-apprate" for ios
Plugin dependency "cordova-plugin-dialogs#1.3.0" already fetched, using that version.
Installing "cordova-plugin-dialogs" for ios
Plugin dependency "cordova-plugin-globalization#1.0.4" already fetched, using that version.
Installing "cordova-plugin-globalization" for ios
Cross-platform AppRate plugin for Cordova / PhoneGap
Installing "cordova-plugin-camera" for ios
Plugin dependency "cordova-plugin-compat#1.1.0" already fetched, using that version.
Installing "cordova-plugin-compat" for ios
Plugin "cordova-plugin-compat" already installed on ios. Making it top-level.
Installing "cordova-plugin-console" for ios
Installing "cordova-plugin-device" for ios
Plugin "cordova-plugin-dialogs" already installed on ios. Making it top-level.
Installing "cordova-plugin-file" for ios
Plugin dependency "cordova-plugin-compat#1.1.0" already fetched, using that version.
Dependent plugin "cordova-plugin-compat" already installed on ios.
The Android Persistent storage location now defaults to "Internal". Please check this plugins README to see if you application needs any changes in its config.xml.
If this is a new application no changes are required.
If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:
"<preference name="AndroidPersistentFileLocation" value="Compatibility" />"
to config.xml in order for the application to find previously stored files.
Installing "cordova-plugin-file-transfer" for ios
Plugin dependency "cordova-plugin-file#4.3.0" already fetched, using that version.
Dependent plugin "cordova-plugin-file" already installed on ios.
Plugin "cordova-plugin-globalization" already installed on ios. Making it top-level.
Installing "cordova-plugin-splashscreen" for ios
Installing "cordova-plugin-statusbar" for ios
Installing "cordova-plugin-whitelist" for ios
Installing "cordova-plugin-x-socialsharing" for ios
Installing "cordova-plugin-x-toast" for ios
Installing "ionic-plugin-keyboard" for ios
Installing "phonegap-plugin-push" for ios
Failed to install 'phonegap-plugin-push': undefined
Error: /Library/Ruby/Gems/2.0.0/gems/claide-1.0.2/lib/claide/command.rb:439:in `help!': [!] You cannot run CocoaPods as root. (CLAide::Help)
Usage:
$ pod COMMAND
CocoaPods, the Cocoa library package manager.
Commands:
+ cache Manipulate the CocoaPods cache
+ env Display pod environment
+ init Generate a Podfile for the current directory
+ install Install project dependencies according to versions from a
Podfile.lock
+ ipc Inter-process communication
+ lib Develop pods
+ list List pods
+ outdated Show outdated project dependencies
+ repo Manage spec-repositories
+ setup Setup the CocoaPods environment
+ spec Manage pod specs
+ update Update outdated project dependencies and create new Podfile.lock
Options:
--silent Show nothing
--version Show the version of the tool
--verbose Show more debugging information
--no-ansi Show output without ANSI codes
--help Show help banner of specified command
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:47:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
I had installed cocoapods and run the above command with sudo and without sudo.
I had solved the problem by changing the plugin phonegap-push with Firebase plugin and now its working fine in android as well as IOS. Please go with the cordova-firebase plugin version 1.22.

How to install Play Store App on Android Studio Emulator Google API 23

I selected this emulator from the newest version of Android Studio AVD,
Google API 23
I have selected the latest version of android API 23. Because it says "with Google APIs", I thought that it would actually include all the Google apps, including Play Store so that I can install apps like Facebook.
But I can't see any Google Apps in it.
How do I install Gapps on Android Studio Emulator with Google API23?
Starting from API24 Google publishes emulator images with Google Play. Download it from CLI:
yes | sdkmanager "system-images;android-24;google_apis_playstore;x86" \
"system-images;android-25;google_apis_playstore;x86" \
"system-images;android-26;google_apis_playstore;x86" \
"system-images;android-27;google_apis_playstore;x86" \
"system-images;android-28;google_apis_playstore;x86_64"
Or download it from AndroidStudio:
You can install a particular system image via the terminal, with the following command:
sdkmanager "system-images;android-30;google_apis_playstore;x86"
Trying to install the system images via the terminal, produced the following error:
'sdkmanager' is not recognized as an internal or external command,
operable program or batch file.
If you get this error, then you need to locate where sdkmanager is installed and add that folder to your PATH environment variable.
For me this was located under <AndroidSDK>\tools\bin
However, even after doing this I still got the following error.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 5 more

export android project add facebook sdk get error convert to dalvik format failed with error 1

i am doing a small project on android and it using facebook sdk 3.0. everything is ok until i export to upload android market, i got error "error convert to dalvik format failed with error 1" and i try export 2 sample projects in sdk, i got same error. i research on google ,the cause is the projects and facebook sdk have same name file R.java in com.facebook.android. But because it file R.java so i cannot rename it. i try other way, i turn off "build automatically" and delete R.java file in facebook sdk, it can export keystore and apk file but apk file don not work. So what can i do to fix it?
thanks
I was having this problem too with an app that used Facebook SDK. I was trying all sorts of stuff, so I'm not sure what exactly fixed but here's settings that worked for me:
FacebookSDK > Properties > Java Build Path > Order and Export
Android 2.2 - NOT CHECKED
Android Private Libraries - CHECKED
Android Dependencies - CHECKED
MyApp > Properties > Java Build Path > Order and Export
Android 4.2.2 - CHECKED
Android Private Libraries - CHECKED
Android Dependencies - CHECKED
In addition, I had done this before, not sure it mattered. Reverted to Facebook SDK version 3.5 from 3.5.2. Updated to latest ADT 22.2.1. Changed Facebook SDK to use Android 2.2 from 4.2.2.