Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Program type already present: javax.inject.Inject #53

Closed
kaprat opened this issue Jan 22, 2019 · 1 comment
Closed

Program type already present: javax.inject.Inject #53

kaprat opened this issue Jan 22, 2019 · 1 comment

Comments

@kaprat
Copy link

kaprat commented Jan 22, 2019

I am getting this issue
Message{kind=ERROR, text=Program type already present: javax.inject.Inject, sources=[Unknown source file], tool name=Optional.of(D8)}

I am using sample app. Here is my build.gradle

apply plugin: 'com.android.application'

android {
  compileSdkVersion 27
  defaultConfig {
    applicationId "com.example.supercookie"
    minSdkVersion 21
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  }
  buildTypes {
    release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
}


repositories {
  google()
  jcenter()
  maven {
    url 'https://sdk.squareup.com/public/android'
  }
}

dependencies {
  def inAppPaymentsSdkVersion = '1.0.3'
  implementation "com.squareup.sdk.in-app-payments:card-entry:$inAppPaymentsSdkVersion"
  implementation "com.squareup.sdk.in-app-payments:google-pay:$inAppPaymentsSdkVersion"
  implementation 'com.squareup.retrofit2:retrofit:2.4.0'
  implementation 'com.squareup.retrofit2:converter-moshi:2.4.0'
  def supportLibraryVersion = '27.1.1'
  implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
  implementation "com.android.support:design:$supportLibraryVersion"
  implementation 'com.android.support.constraint:constraint-layout:1.1.3'
  // Play Services Wallet 16.0.1 was published with dependencies on maps & identities 16.0.0.
  implementation 'com.google.android.gms:play-services-wallet:16.0.1'
  implementation 'com.squareup:connect:2.20181212.0' //Getting error after adding this line
}
@StephenJosey
Copy link

@kaprat sorry for the delay! Typically the Connect SDK isn't meant to be used on a mobile device, you would want to implement them on backend server. I suspect that there is a conflict between the SDKs using the javax.inject.inject. However, I strongly recommend not using the Connect SDK within your Android application as it is not secure (you would need to store your API credentials on the mobile device which is not secure). Please let me know if you have additional questions about this.

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

No branches or pull requests

2 participants