-
Notifications
You must be signed in to change notification settings - Fork 17
Issue with Gradle Offline mode #91
Comments
@CeccoCQ Could you let us know when you did to speed up the build? You noted that "... but when I try to speed up the gradle build, I get this error". I recommend making sure Android Studio isn't set to offline mode. Also make sure you are not having any connection issues, or have a firewall or proxy blocking any connections. |
Hi @jkasten2 thanks for your reply. I think to something like import specific dependency or exclude modules from onesignal library. |
@CeccoCQ Sorry for the delay, you should be able to sync your gradle once when online and then be able to do builds offline without any issues. You should also be able to change your If you found any cases where offline does not work even though you synced once while online let us know the exact steps to reproduce the issue and we can take a 2nd look. Thanks! |
@jkasten2 thanks for your response, but currently I'm not able to sync my project in offline mode. Please, follow these steps:
Now, you have these errors:
|
@CeccoCQ We were not able to reproduce the issue with the steps you provided on our example project. Can you try this project as well to let us know if you can reproduce it? If not then the issue is related to your specific project. Please share your all your |
I've found the issue. The solution is to add the exclude clause to dependency:
then add the missing dependencies manually, for example: This is caused by the dependency of Google Play Services into OneSignal SDK that are not aligned with the latest versions of firebase and gms. |
@CeccoCQ Thanks for replying back with a workaround for the issue. The issue might be related to the OneSignal-Gradle-Plugin and how it scans the project then picks versions of dependencies based on what it finds. When it doing it's version discovery process it might not trigger gradle to cache the intermittent versions. So when it tries to do this process offline it might be missing some versions from the cache. We can still look into fixing this issue but haven't been able to reproduce it yet. We will be testing with a flushed Gradle cache with some projects but if you have specific |
Closing due to inactivity |
Hello! I faced with the same issue described in previous post. Also I use version 3.9.1 and workaround doesn't work for me. Do you have any updates? |
@Mu3AHTPOn Can you reproduce the issue in a new project and share it? I tried what was in the previous post you noted but we were unable to reproduce the issue before. |
Hi, i am getting this error when resync gradle. Please help using on ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.google.android.gms:play-services-location:[15.0.0, 16.0.0). ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.google.android.gms:play-services-base:[15.0.0, 16.0.0). |
This issue is actually Intermittent download issues in Bintray. Now everything is working fine. Checking on the status of Bintray |
After adding One Signal Library, not able to sync offline.
|
I'm having a similar issue. I'm unable to build my project in offline mode.
|
Need some help here, this has been a happening to us after updating the OneSignal library. This is quite a blocker for faster builds. |
IssueThis issue is related to Reproducing IssueAn simple example project reproducing the issue and / or a unit test added to a fork of this repo in MainTest.groovy would help us hunt down and confirm a fix for this issue. Workarounds
|
I have the same issue when wanting to build offline, & this is what I have added in my app's build.gradle as a workaround to overcome it:
You can keep the libs relevant to your project. The way to identify what all needs to go in that block is: Note: For identifying the version to use, you can generate a dependency chart for your app in online mode & add use it to identify what version is being used. The command to generate a dependency chart is: |
Dynamic ranges are such a bad practice. I really don't understand why OneSignal is using them everywhere. https://blog.danlew.net/2015/09/09/dont-use-dynamic-versions-for-your-dependencies/ |
thank you, my problem with offline gradle is fixed with this without
and also exclude gms
|
thank you and this solved my problem , must update onesignal document for this |
Status
Status section + Issue header added by @jkasten2
Issue
It's simple.
I've imported:
implementation ('com.onesignal:OneSignal:3.10.5')
and
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
but when I try to speed up the gradle build, I get this error:
The text was updated successfully, but these errors were encountered: