Huawei Ads kit Banner Ad returns Error code 1

519 Views Asked by At

I am trying to integrate Huawei Ads kit to my application but it constantly returns me Error code 1 and fails showing any ad. I wish the errors would be more explanatory.

Does anybody have an idea how can I solve this problem?

2

There are 2 best solutions below

0
Ibrahim R Serpici On BEST ANSWER

Error code 1 represents invalid slot id or invalid banner ad size. Please check your bannerview size and ad slot id.

And if you can look at the link below, error codes are self explanatory : https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/ads-sdk-faq

Huawei Ads Kit Error Codes

0
Style-7 On

In my case I used:

xmlns:hwads="http://schemas.android.com/tools"

instead

xmlns:hwads="http://schemas.android.com/apk/res-auto"

But was not any errors in xml file. So, use the second variant.