Closed kjav closed 3 years ago
I forgot to mention - I'm using the editor version 3.2.2-stable. However I have replicated the issue in Godot 3.2.3-stable.
Hi @kjav check if you enabled Android platform on NativeLib view on the top. If not you should enable it and reinstall plugin.
Hi, thanks for the reply! I have tried that already - uninstalling, ensuring the android switch is switched, and then reinstalling the plugin. Unfortunately it didn't fix the issue. Do you have any more advice for debugging this? Is there a video somewhere showing the whole process of adding this plugin? Thanks for the help.
I didn't recorded video for installation process but it may be a good idea. Also check if plugin's checkbox enabled in your export settings.
Ah, this seems like it is getting to my issue now! I don't have a plugins section in my export settings in the editor. Is that something that should be added by NativeLib, or is it because of the version I'm using (3.2.3)?
New andoroid plugin system was implemented in 3.2.2 and all my plugins should be compatible with 3.2.2. So it is not a version issue. Check if you installed Nativelib-Export plugin and if it enabled.
Hmm, the android/plugins directory is empty, and according to the docs this is where the plugins section of the export settings is generated from? Here are my settings: (I installed after switching on 'Android' at the top, and the ID field is usually filled in but blanked out here for privacy) Maybe I need to delete all of the files and start over, as initially I didn't switch on 'Android' in NativeLib before installing facebook. Do you think that would help?
The facebook plugin uses some hacks to compile so it is in android/facebook
folder but not in android/plugins
.
Hmm, so shouldn't it still show up in the plugins section of the android export window? This documentation seems to suggest there will be a '.gdap' file somewhere but I can't find it in the android/facebook/ directory:
$ dir android/facebook/ AndroidManifest.conf AndroidManifestChunk.xml gradle.conf res/ src/
Thanks for all your help so far.
In fact I have just confirmed that installing another plugin (GameAnalytics) does show up in the Plugins section of the export templates. So the problem does appear to be with the Facebook plugin (or how I'm using it!)
I was wrong, the facebook plugin should not appear in export window (I forgot about that). It injects singleton class during custom compilation and therefore it has no gdap file.
I see, thanks. Is there any other reason why I should be recieving this errors then? I believe I have all of the settings correct in my project.
I've just tried going through all the steps again, and noticed this error when installing the facebook plugin:
Installing facebook@0.1.6
Unpack facebook_0.1.6_all.tgz
Unpack facebook_0.1.6_android.tgz
core/image.cpp:1604 - Index p_width - 1 = -1 is out of bounds (MAX_WIDTH = 16384).
Width of image must be greater than 0.
core/image.cpp:2390 - Condition "data.size() == 0" is true.
drivers/png/png_driver_common.cpp:56 - png_image_write_to_memory: invalid argument
drivers/png/png_driver_common.cpp:183 - Condition "compressed_size <= png_size_estimate" is true. Returned: FAILED
Can't convert image to PNG.
Add: res:C:/Users/<>/git/nl/godot/BobaCup/android/facebook/res
I also tried the steps in an empty project, and didn't recieve this error. Is there a particular image this library is accessing in the project (e.g. icon.png) which I should be careful to include? Thanks!
It is very strange because android/facebook/res
should not contain any png images. It only contains one xml file with FB App ID.
OK, I think the png error was a red herring - sorry! Must have been a poorly timed error coming from somewhere else in the project.
I think I've narrowed it down to the export template; creating a brand new export template makes the facebook API work when deployed to my android device. Do you know which settings might be causing my other export template to fail? "Use custom build" is selected on both. Thanks!
When I face some strange errors related to android internal build system I usually go to android/build
folder and do ./gradlew clean
Sometime it helps
Thanks, that seemed to fix it!
Hi, I've been trying to install this plugin, however so far I cannot get the plugin to initialise properly on Android. This is the error I get:
**Warning**: Facebook plugin not found!
I installed the plugin via nativelib from the asset store. I put in a valid facebook app ID code, and clicked the switch "Enable Android for project" at the top of the NativeLib ui. I've also enabled "use custom build" in the export template. However I still see this error when I run the game on Android. Do you have any ideas of where I might have gone wrong, and how I can debug this issue? Thanks!