-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where do I find the gradle file? #9
Comments
Where is the documentation you're referring to? Are the docs part of the Firebase Console (i.e http://console.firebase.google.com) or something else? |
Here: https://firebase.google.com/docs/unity/setup Under Add Firebase to Your app, it says to "Click Add Firebase to your Android app and follow the setup steps.". The last step of that includes linking the gradle files. How exactly do I do that for Unity? Or how does it read the Json file downloaded? |
Ah I see, yes we're aware we need to update the documentation in the e.g for Android " Drag the google-services.json downloaded from the Firebase console into Cheers, On Mon, Nov 21, 2016 at 9:56 AM, Kuan Chern Chua notifications@github.com
|
I've tried that, but even when FetchAsync() returned true, the values did not fetch correctly from the server. It still returned the default values. What might be the problem here? I've checked my bundle identifier and it's correct. Even the quickstart app I downloaded returned the default values. |
Did you call ActivateFetched() ? Fetch simply downloads data from the server. ActivateFetched switches the On Mon, Nov 21, 2016 at 4:42 PM, Kuan Chern Chua notifications@github.com
|
Yes, I did. Unfortunately, it still returns the default value. I'm doing this in the Unity editor, though. Do I have to build it on a device to work? Also, how exactly do I link my. json file? Do I only need to drag and drop it any where in my folder? I'm using the test-app in my Unity. Here are the logs:
Edit: |
The desktop implementations consist of stubs (i.e it's purely for testing and doesn't connect to our backends). You need to build and deploy on Android and iOS for our SDKs to work. Regarding the crash, what logs do you see from the devices? |
Also, regarding the .json and .plist files you need to drag / drop them anywhere in your Unity project folder. If you do not do this, check the Unity console - you'll see errors in the Unity console warning you that when the projects launch on device they'll fail to work. |
I know how to look at logs within logcat, but what do I look for in this case? It crashes on every single device. Can you look at this: http://pastebin.com/96nRSgXk |
The crash you're seeing is due to missing Android resources in your project. You can verify Android resources are unpacked by looking for files matching under Assets/Plugins/Android/firebase-* . If they're not present, select the "Assets -> Play Services Resolver -> Android Resolver -> Resolve Client Jars" from the Unity menu. Check your Unity logs to see whether any errors are reported, if errors are present you'll need to resolve them before proceeding to build the application. |
There are NO errors in Unity. "Assets -> Play Services Resolver -> Android Resolver -> Resolve Client Jars" from the Unity menu asks if I want to replace Google Play services 9.8.0 with 10.0.0, then throws this error: Unable to find jar in the system path. This tool is required to process Play Services dependencies. Either set JAVA_HOME or add jar to the PATH variable to resolve this error. |
There's your error. You need to setup your java environment and point the
JAVA_HOME environment variable at the Java directory.
…On Wed, Nov 23, 2016 at 4:29 PM, Kuan Chern Chua ***@***.***> wrote:
There are NO errors in Unity.
"Assets -> Play Services Resolver -> Android Resolver -> Resolve Client
Jars" from the Unity menu asks if I want to replace Google Play services
9.8.0 with 10.0.0, then throws this error:
Unable to find jar in the system path. This tool is required to process
Play Services dependencies. Either set JAVA_HOME or add jar to the PATH
variable to resolve this error.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFw1RDE6MUK-ST1atMSHbqaVRIrp8VHQks5rBNqAgaJpZM4K39Y8>
.
|
I was able to build the app. The first fetch was successful. After I added the parameters to Firebase console and fetched data again, it says: I checked and the bundle identifiers and the .json are correct. How do I resolve this issue? Here are my parameters which already have been published: http://imgur.com/a/gJLyy FIXED: I had to change the bundle identifier. |
Could you share the complete log from the application?
…On Wed, Nov 23, 2016 at 5:08 PM, Kuan Chern Chua ***@***.***> wrote:
I was able to build the app. The first fetch was successful. After I added
the parameters to Firebase console and fetched data again, it says:
Fetch completed successfully!
Fetch failed for unknown reason
I checked and the bundle identifiers and the .json are correct. How do I
resolve this issue?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFw1ROIq4qDFQvymx8h_a5vpThvlZyH2ks5rBOOpgaJpZM4K39Y8>
.
|
Hi Stewart, I managed to fix the above errors. I have another question. I'm trying to include Admob in my project. The Firebase documentation pointed me to this package: https://github.com/googleads/googleads-mobile-unity/releases/tag/3.1.2 I downloaded the package and imported it then built. It built successfully onto my device, but my app crashes upon starting and throws the following error:
What is causing this? I tried the following:
|
Looks like you're ending up with conflicting aars (Android packages) being included in the project. Before you attempted to resolve the error - which I think made this worse - do you have the error logs reported by the plugins? It's likely the Jar Resolver complained about conflicting aar versions, it would be great to see exactly what happened so that we can fix it. |
Closing out the issue here as it looks like you've cross posted to the AdMob tracker. In future, please either close out duplicate threads / issues or reference the cross posts using a link as it saves everyone following along a lot of time searching for information or answering questions. |
I'm following the steps outlined here:
1: Click Add Firebase to your Android app and follow the setup steps. If you're importing an existing Google project, this may happen automatically and you can just download the config file.
2: When prompted, enter your app's package name. It's important to enter the package name your app is using; this can only be set when you add an app to your Firebase project.
3: Download a google-services.json file when instructed. You can redownload this file again at any time.
4: Copy this file to anywhere inside your project's assets folder.
After 4, the next step prompts me to add lines into gradle files, but I can't find anywhere to download the gradle package for Unity. Am I missing something here?
The text was updated successfully, but these errors were encountered: