Hi Team, Developers
I'm using Google Ads API and please find the following versions below:
build.gradle
implementation 'com.google.api-ads:google-ads:14.0.0'
implementation group: 'com.google.api', name: 'gax', version: '1.65.1'
implementation group: 'com.google.api', name: 'gax-grpc', version: '1.65.1'
The problem is when calling:
ResourceNames.campaignCriterion(123, 456, 789);
It always return with the exception below:
Exception in thread "main" com.google.api.pathtemplate.ValidationException: Unbound variable 'campaign_id}~{criterion_id'. Bindings: {customer_id=123, campaign_id=456, criterion_id=789}
at com.google.api.pathtemplate.PathTemplate.instantiate(PathTemplate.java:734)
at com.google.api.pathtemplate.PathTemplate.instantiate(PathTemplate.java:681)
at com.google.api.pathtemplate.PathTemplate.instantiate(PathTemplate.java:692)
at com.google.ads.googleads.v8.resources.CampaignCriterionName.toString(CampaignCriterionName.java:153)
at com.google.ads.googleads.v8.resources.CampaignCriterionName.format(CampaignCriterionName.java:87)
at com.google.ads.googleads.v8.utils.ResourceNames.campaignCriterion(ResourceNames.java:415)
at com.dentsu.setup_campaign.service.adwords.impl.GoogleAdsService.main(GoogleAdsService.java:218)
Even it's the mock ids but the method ResourceNames.campaignCriterion() should return the string back without "Unbound variable" error.
I'm not to sure that I use the correct one.
Thanks,
Marut