0

I have been working with two android studio projects separately.

Project 1: Uses a third party proprietary library (SDK minversion 9) for generating online credit cards transactions. After coding the app works just fine.

Project 2: Uses another third party proprietary lib (SDK minversion 5) for handling an audioJack card reader. After coding the app works just fine too.

The problem starts when I try to merge them in order to create the complete POS solution. And it comes from the differences of sdk Version of the libraries.

I tried to change the min version param in the build.gradle files after merging... but after that, code of Project 2 starts generating errors due to the new sdk version used to compile (Probably it has some deprecated classes inside).

1) With this Gradle this works fine: apply plugin: 'com.android.application'

android {
    compileSdkVersion 20
    buildToolsVersion "25.0.2"

    defaultConfig {
        applicationId "com.acs.audiojackdemo"
        minSdkVersion 5
        targetSdkVersion 20

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile files('libs/acsaudiojack-1.0.0preview15.jar')
}

2) The error is thrown when I add the library:

compile('com.mercadopago:sdk:2.3.6@aar') { transitive = true }

The error is:

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : 
   uses-sdk:
     minSdkVersion 5 cannot be smaller than version 9 declared in library 
       [com.mercadopago:sdk:2.3.6] 
         C:\Users\jajal\.android\build-cache\2c961bb48263cf26566b0501fade730485d110de\output\AndroidManifest.xml
    Suggestion: use tools:overrideLibrary="com.mercadopago" to force usage

3) If I change the minSdkVersion value from 5 to 9, I get plenty of errors. The first error is:

Error:(3) Error retrieving parent for item: 
    No resource found that matches the given name
      'android:Widget.Material.Spinner.Underlined'.
Cœur
  • 37,241
  • 25
  • 195
  • 267
  • By the way, I dont have access to the project 1 core jar file since it is a since party lib. So I cant change the minVersion 9 to 5. I only can do the opposite: change Project 2 minversion 5 to 9... but it starts to fail. – Alejandro Martinez Apr 21 '17 at 22:03
  • this doesn't contain enough information to be an answerable question. Have you tried updating the code for Project 2 to SDK v9? What kinds of errors are you receiving that you don't know how to deal with? – David Jeske Apr 21 '17 at 23:37
  • Ok , let me explain it in a more specific and simple way... – Alejandro Martinez Apr 23 '17 at 01:22
  • My app gradle file: apply plugin: 'com.android.application' android { compileSdkVersion 20 buildToolsVersion "25.0.2" defaultConfig { applicationId "com.acs.audiojackdemo" minSdkVersion 5 targetSdkVersion 20 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencies { compile files('libs/acsaudiojack-1.0.0preview15.jar') } – Alejandro Martinez Apr 23 '17 at 01:26
  • Whith this gradle file it runs ok (The main app in this case is the audioJAckReader) if I try to add the online lib from MercadoPago (compile('com.mercadopago:sdk:2.3.6@aar') { transitive = true }) it throws the error.... Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed : uses-sdk:minSdkVersion 5 cannot be smaller than version 9 declared in library [com.mercadopago:sdk:2.3.6] C:\Users\jajal\.android\build-cache\2c961bb48263cf26566b0501fade730485d110de\output\AndroidManifest.xml Suggestion: use tools:overrideLibrary="com.mercadopago" to force usage – Alejandro Martinez Apr 23 '17 at 01:29
  • the additional information is helpful. however, please don't over-use all-caps. Use the formatting toolbar to mark code-sections as code, and use bold and italics. I've edited your question to improve the formatting. – David Jeske Apr 23 '17 at 17:11
  • Right now your question reads as "please debug this unknown problem for me". Often to do this, people would need access to all your project files. Stack Overflow works best when you post specific and well articulated questions. You might consider posting a smaller question, such as "why do I get these errors switching Android minSdkVersion from 5 to 9", and include all the errors you see. – David Jeske Apr 23 '17 at 17:18
  • This question looks related - http://stackoverflow.com/questions/31931024/no-resource-found-errors-when-building-app – David Jeske Apr 23 '17 at 17:20
  • @Cœur my edit was about fixing the formatting and removing over-use of ALL CAPS. I merely fixed proprietary because it was mis-spelled according to Google Chrome spellcheck. – David Jeske Apr 24 '17 at 05:00
  • @DavidJeske well, you got lucky, it was accepted. I've fixed the spelling afterward. – Cœur Apr 24 '17 at 07:13

0 Answers0