1

I am using a amazon apps with my android apps.

PurchasingManager.initiateItemDataRequest(skuKye); is defined the error like skuKye is string.U have to convert it into the set data type.

Please guide me

3
  • The method initiateItemDataRequest(Set<String>) in the type PurchasingManager is not applicable for the arguments (String) Commented Nov 21, 2012 at 5:11
  • String skuKye="DeveloperSKU-1234"; Commented Nov 21, 2012 at 5:12
  • PurchasingManager.initiateItemDataRequest(skuKye); the error is occur in this place. Commented Nov 21, 2012 at 5:13

1 Answer 1

3

The initiateItemDataRequest method requires a Set<String> containing the SKUs for the request. If you have only one SKU, you should be able to call it this way:

Set<String> skuSet = new HashSet<String>();
skuSet.add(skuKye);
PurchasingManager.initiateItemDataRequest(skuSet);
Sign up to request clarification or add additional context in comments.

3 Comments

skus is comes from where?? i am using this way String skuKye="DeveloperSKU-1234"; final Set<String> skuSet = new HashSet<String>(); skuSet.add(skuKye); but is display the same error like Multiple markers at this line - Syntax error on token "skuKye", VariableDeclaratorId expected after this token - Syntax error on token(s), misplaced construct(s)
@user1838195 - sorry, that was a typo (now fixed). It was supposed to be skuSet. The code in your comment looks okay to me. Which line exactly has the syntax error? Did you import Set and HashSet from java.util? (Perhaps you can edit your question and post the exact code, formatted for readability. Also post a few lines around it, in case a nearby syntax error is causing the message.)
@user1838195 - Also, what are some of the other error markers on that line?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.