Skip to content
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

Getting Stackoverflow error when compiling my project in android studio #16

Open
ghost opened this issue Dec 1, 2021 · 11 comments
Open

Comments

@ghost
Copy link

ghost commented Dec 1, 2021

Describe the bug
Currently, I'm using these many HMS-core libraries along with some google libraries in my project.

    implementation 'com.google.android.gms:play-services-base:17.6.0'
    implementation 'com.google.android.gms:play-services-maps:18.0.0'
    implementation 'com.google.android.gms:play-services-location:18.0.0'
    implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
    implementation 'com.google.android.gms:play-services-auth:19.2.0'

    implementation 'com.huawei.hms:location:6.2.0.300'
    implementation 'com.huawei.hms:site:6.2.0.301'
    implementation 'com.huawei.hms:maps:6.2.0.301'
    implementation 'com.huawei.hms:push:6.1.0.300'
    implementation 'com.huawei.hms:scan:2.2.0.300'

and In my app->Build.gradle these many plugins I'm using

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
apply plugin: 'com.huawei.agconnect'

When compiling and installing apk in the emulator at that time I'm getting this error. please check the attached screenshots.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:getDependencies'.
> java.lang.StackOverflowError (no error message)

Screenshots
image
image

Desktop (please complete the following information):

  • Gradle version: 7.0.3
  • Android Studio version: Android Studio Arctic Fox | 2020.3.1 Patch 3

Additional context
Note: If I'm commenting out this line or using older versions of gms libraries in that case it works fine.
// apply plugin: 'com.google.android.gms.oss-licenses-plugin'

implementation 'com.huawei.hms:location:5.1.0.303'
implementation 'com.huawei.hms:site:6.0.0.300'
implementation 'com.huawei.hms:maps:6.0.0.301'
implementation 'com.huawei.hms:push:5.3.0.301'
implementation 'com.huawei.hms:scan:2.2.0.300'

Is there a workaround for this issue? kindly, suggest.

@Mike-mei
Copy link
Contributor

Mike-mei commented Dec 2, 2021

May i ask will there still facing this issue if you do not reference the HMS libraries ?

@ghost
Copy link
Author

ghost commented Dec 2, 2021

Yes, even with

implementation 'com.huawei.hms:location:5.1.0.303'
implementation 'com.huawei.hms:site:6.0.0.300'
implementation 'com.huawei.hms:maps:6.0.0.301'
implementation 'com.huawei.hms:push:5.3.0.301'
implementation 'com.huawei.hms:scan:2.2.0.300'

these versions working fine,
but when I'm using the latest versions of HMS libraries at that time facing issues,

Here, attaching your mapkit demo for your reference.
kotlin.zip

@Mike-mei
Copy link
Contributor

Mike-mei commented Dec 2, 2021

Please try to update the AppGallery Connect Plugin, the latest version is classpath 'com.huawei.agconnect:agcp:1.6.1.300'

@ghost
Copy link
Author

ghost commented Dec 2, 2021

yes, I have tried that one also but didn't work.

image

@Mike-mei
Copy link
Contributor

Mike-mei commented Dec 3, 2021

Try to add implementation ‘com.huawei.hms:network-common:5.0.7.300’ before all HMS dependencies

@ghost
Copy link
Author

ghost commented Dec 6, 2021

yes, by using

implementation ‘com.huawei.hms:network-common:5.0.7.300’

I can able to create Build but, I want to ask by using this lib is there a Knock-on effect on other functionality?

Because after using this solution my site query suggestion searching API always gives errors.

HMSSDK_TaskApiCall: doExecute, uri:site.querySuggestion, errorCode:1212, transactionId:101677875estion20211206113837991921108
HmsSiteKit_QuerySuggestionTaskApiCall_70: responseErrorCode errorCode = 1212 errorReason = need update kit

If I use the old version build everything works fine, I can get proper response from site query suggestion searching API.

Please let me know.

@Mike-mei
Copy link
Contributor

Sorry, it's a bug. We will fix that in 6.3.0 version. The next version will be released in the end of December or the middle of January.

@Mike-mei
Copy link
Contributor

yes, by using

implementation ‘com.huawei.hms:network-common:5.0.7.300’

I can able to create Build but, I want to ask by using this lib is there a Knock-on effect on other functionality?

Because after using this solution my site query suggestion searching API always gives errors.

HMSSDK_TaskApiCall: doExecute, uri:site.querySuggestion, errorCode:1212, transactionId:101677875estion20211206113837991921108
HmsSiteKit_QuerySuggestionTaskApiCall_70: responseErrorCode errorCode = 1212 errorReason = need update kit

If I use the old version build everything works fine, I can get proper response from site query suggestion searching API.

Please let me know.

About the errorCode:1212, please try to update the hms core version, you can reference this document

@ghost
Copy link
Author

ghost commented Dec 15, 2021

Okay, will wait for new updates, Thank you for your support.

@Mike-mei
Copy link
Contributor

@dixitpTheaa This issue have been sloved in the latest release, please try again.

@ghost
Copy link
Author

ghost commented Jan 17, 2022

Okay, thank you, for your support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant