Missing android support library onesignal unity

Missing Android Support Library #321

Comments

Reconder commented Oct 5, 2020 •

Description:

When I’m testing my app I get «Missing Android Support Library» error for my testing device on my app’s all users page. It also doesn’t receive any push notifications that I send.

Environment

  1. I’m using Unity 2018.4.1f1 and Unity OneSignal SDK 2.13.1
  2. I haven’t implemented any other SDKs yet and my project is literally the sample scene that you get when you start a new project in Unity + empty object with OneSignal initialization script.
  3. Android only.

Steps to Reproduce Issue:

  1. Import the latest OneSignalSDK.unitypackage into your project
  2. Initialize OneSignal with your app ID
  3. Build a project and install the app on a test device
  4. Attempt to receive a push notification

The text was updated successfully, but these errors were encountered:

nikomikulicic commented Oct 7, 2020

I had the same issue in Unity 2019.2.1f1 and again in Unity 2019.4.1f1. Both times I resolved it with these instructions: https://documentation.onesignal.com/docs/troubleshooting-unity#androidx-compatibility

However, I had Firebase SDK installed so I thought that was causing the problems. Maybe it was something else after all.

rgomezp commented Nov 13, 2020

Glad you were able to resolve.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

OneSignal Push Notification Service Documentation

OneSignal Help & Documentation

Welcome to the OneSignal New IA developer hub. You’ll find comprehensive guides and documentation to help you start working with OneSignal New IA as quickly as possible, as well as support if you get stuck. Let’s jump right in!

Читайте также:  Android open external file

Troubleshooting Unity

Common setup and troubleshooting issues with Unity iOS, Android (and derivatives like Amazon).

If you see a Google Play Services, Android Support, or AndroidX missing library error then the External Dependency Manager may have not have resolved dependencies.

1. Run Assets > External Dependency Manager > Android Resolver > Force Resolve from the menu bar.

2. You should now a list of files similar to the screenshot below in your Assets/Plugins/Android folder.

3. If these files do not appear check the Unity log for errors and follow the External Dependency Manager error instructions.

Done! Please check the other sections below if you still see an error. If the problem persists, send your console log, Unity version, and other plugins in your project to OneSignal. support.

Please follow these steps if you are seeing errors like this when building;

1. Go to Assets > External Dependency Manager > Android Resolver > Settings and check the following;

  • Use Jetifier
  • Patch gradleTemplate.properties
  • Use project settings

2. Scroll down and press «OK» to save these settings.

3. Go to File > Build Settings. then click on the «Player Settings. » button

4. From here go to Publishing Settings and check «Custom Gradle Properties Template».

Источник

OneSignal Push Notification Service Documentation

OneSignal Help & Documentation

Welcome to the OneSignal New IA developer hub. You’ll find comprehensive guides and documentation to help you start working with OneSignal New IA as quickly as possible, as well as support if you get stuck. Let’s jump right in!

Troubleshooting Unity

Common setup and troubleshooting issues with Unity iOS, Android (and derivatives like Amazon).

Check this page first for common issues based on Unity Setup.

For Android and/or iOS Platform issues see:

If stuck, contact support directly or email [email protected] for help. For faster assistance, please provide:

  • What version of Unity are you using?
  • What version of the OneSignal Unity SDK are you using?
  • Do your build settings use «Custom Main Gradle Template» or not?
    Can you provide a copy of your:
  • manifest.json (located in the Packages/ folder)
  • GchProjectSettings.xml (located in the ProjectSettings/ folder)
  • AndroidResolverDependencies.xml (located in the ProjectSettings/ folder)

If you see a Google Play Services, Android Support, or AndroidX missing library error then the External Dependency Manager may have not have resolved dependencies.

1. Run Assets > External Dependency Manager > Android Resolver > Force Resolve from the menu bar.

2. You should now a list of files similar to the screenshot below in your Assets/Plugins/Android folder.

Читайте также:  Как сделать светлую тему андроид

3. If these files do not appear check the Unity log for errors and follow the External Dependency Manager error instructions.

Done! Please check the other sections below if you still see an error. If the problem persists, send your console log, Unity version, and other plugins in your project to OneSignal. support.

Unity triggers this when it’s in «Development» mode when doing a build. This will not show on «Production» unless you have another iOS Library that requires it. OneSignal does not require this.

Please follow these steps if you are seeing errors like this when building;

1. Go to Assets > External Dependency Manager > Android Resolver > Settings and check the following;

  • Use Jetifier
  • Patch gradleTemplate.properties
  • Use project settings

2. Scroll down and press «OK» to save these settings.

3. Go to File > Build Settings. then click on the «Player Settings. » button

4. From here go to Publishing Settings and check «Custom Gradle Properties Template».

Источник

Android runtime error: «Could not find the Android Support Library. Please make sure it has been correctly added to your project.» #319

Comments

dletozeun commented Sep 23, 2020 •

Description:

With the latest OneSignal Unity SDK v.2.13.1 at least in Unity editor 2018.4.22f1, initialization of OneSignal fails because of missing Android Support Library causing inability to receive push notifications.

For more details please see this attached logcat output: logcat.txt

And this unity project repro case: OSFBTest.zip

We have started working on this project in the beginning of August where it was working fine with the dependencies the Play Services Resolver resolved at that time. However without touching anything to the OneSignal SDK, Play Services resolver or the Unity editor version, the resolver recently updated all dependencies to a set of completely different files. It seems that the issue is related to the packages repository.

After forcing the resolution, in verbose mode, there is this warning in the console that might explains what is going on:

Some conflicting dependencies were found.
The following dependency versions were modified:
com.android.support:cardview-v7:[26.0.0, 27.2.0[ —> androidx.cardview:cardview:1.0.0
com.android.support:customtabs:[26.0.0, 27.2.0[ —> androidx.browser:browser:1.0.0
com.android.support:support-v4:[26.0.0, 27.2.0[ —> androidx.legacy:legacy-support-v4:1.0.0
com.google.android.gms:play-services-base:[10.2.1, 12.1.0[ —> com.google.android.gms:play-services-base:12.0.1@aar
com.google.android.gms:play-services-location:[10.2.1, 12.1.0[ —> com.google.android.gms:play-services-location:12.0.1@aar
com.google.firebase:firebase-messaging:[10.2.1, 12.1.0[ —> com.google.firebase:firebase-messaging:12.0.1@aar
UnityEngine.Debug:LogWarning(Object)
Google.Logger:Log(String, LogLevel) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/Logger.cs:99)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:953)
GooglePlayServices.c__AnonStoreyF:<>m__19(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/GradleResolver.cs:383)
GooglePlayServices.c__AnonStorey10:<>m__29() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/GradleResolver.cs:468)
Google.RunOnMainThread:ExecuteNext() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:377)
Google.RunOnMainThread:m__17() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:408)
Google.RunOnMainThread:RunAction(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
Google.RunOnMainThread:Run(Action, Boolean) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
GooglePlayServices.c__AnonStoreyF:<>m__28(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/GradleResolver.cs:468)
GooglePlayServices.ProgressReporter:SignalComplete() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:116)
GooglePlayServices.ProgressReporter:CommandLineToolCompletion(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:107)
GooglePlayServices.c__AnonStorey1:<>m__4() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLine.cs:136)
Google.RunOnMainThread:ExecuteNext() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:377)
Google.RunOnMainThread:m__17() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:408)
Google.RunOnMainThread:RunAction(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:406)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:200)

Environment

  1. What version of the Unity OneSignal SDK are you using? 2.13.1.
  2. Provide a list of your project dependencies : None in the attached repro case except OneSignal.
  3. Does the issue occur only in iOS, Android, etc? Android.
Читайте также:  Как узнать когда активировали андроид

Steps to Reproduce Issue:

  1. Download the repro case
  2. Build it on an Android device
  3. Look at the logcat or the users OneSignal dashboard, it should appear as «Missing Android Support Library».

Anything else:

Check attached logcat.

The text was updated successfully, but these errors were encountered:

Источник

Problem 2.9.0 and Firebase #230

Comments

gpcoder commented Sep 27, 2019

Missing Android Support Library after update to 2.9.0 (as with each major new version. )

The text was updated successfully, but these errors were encountered:

jkasten2 commented Sep 28, 2019

@gpcoder No dependencies for Android were changed from the OneSignal-Unity-SDK 2.8.x to 2.9.0.

Could you provide more details?

  1. Unity version
  2. Other plugins and versions in your project
  3. Logcat of errors / warnings from the device
  4. Example project reproducing issue if possible

imtrobin commented Sep 30, 2019

Try the AndroidX compatability fix workaround, fixed my missing android library problems

gpcoder commented Sep 30, 2019

The simplest is not that Onesignal integrates AndroidX to avoid having to make this big hack?
I prefer to stay on an old version of Onesignal for now.

baksarbed commented Oct 1, 2019 •

Hello @jkasten2
I have the same error

Unity 2019.1.14f1
I have no other plugins
All subscribed, but when I go to tab all users it wrote to me
Missing Android Support Library

BTW Android 9 (Samsung A50)

Bob-pk77 commented Nov 5, 2019

I have the same error
Unity 2019.2.10
OneSignal API 2.9.10f1

How can I solve that ?

jkasten2 commented Nov 5, 2019 •

Ensure Jetifier is disabled under Go to Assets > Play Services Resolver > Android Resolver > Settings . Only do this however if you know for sure you don’t have any other libraries in your project that use AndroidX.

If you have any other plugins in your project that use AndroidX then you will need to follow this AndroidX Compatibility guide instead.
https://documentation.onesignal.com/docs/troubleshooting-unity#section-androidx-compatibility

The latter is recommended as a number of Unity libraries do use AndroidX, the latest Firebase included.

Источник

Оцените статью