Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

350
Visualizações
package com.google.android.gms.samples.wallet does not exist import com.google.android.gms.samples.wallet.Constants

I'm new Android and more new to the payment part of it , i'm going through this link to implement the Gpay into my app

https://developers.google.com/pay/api/android/guides/tutorial#checkoutactivity.java

so i copy the code as is , the version i implemented is

    implementation 'com.android.support:design:28.0.0'
    implementation 'com.google.android.gms:play-services-wallet:18.1.2'
    implementation 'com.android.support:appcompat-v7:28.0.0'

but when i run i keep getting this error

package com.google.android.gms.samples.wallet does not exist import com.google.android.gms.samples.wallet.Constants

how can i resolve this error?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I had a similar problem with a reference to com.google.android.gms.samples.wallet.Constants.PAYMENTS_ENVIRONMENT appearing in the createPaymentsClient method in that tutorial. The code being referred to can be found at https://github.com/google-pay/android-quickstart/blob/master/java/app/src/main/java/com/google/android/gms/samples/wallet/Constants.java, so you can either refactor this into your codebase directly, and change the import statement in paymentsUtil.java to refer to your new location for this file, or you can simply copy following the key line over into paymentsUtil.java and remove the import altogether:

public static final int PAYMENTS_ENVIRONMENT = WalletConstants.ENVIRONMENT_TEST;

The second option is probably easier for when you want to move to a live production environment.

Let me know if this is helpful.

over 4 years ago · Santiago Trujillo Relatório

0

I fixed by using the Constants class in the sample application in here enter link description here. Just download as zip, open and copy the Constant class in your project.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda