question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

zxing3.6.0 / support:appcompat-v7 error...

See original GitHub issue

Description of the problem:

I try…

  • Create New Project

  • target sdk version 28, min sdk version 19

  • compile sdk version 28

  • insert gradle dependencies : implementation ‘com.journeyapps:zxing-android-embedded:3.6.0’

  • implementation ‘com.android.support:appcompat-v7:28.0.0’ <-Error…

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 25.3.1. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:support-media-compat:25.3.1 less… (⌘F1) There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion).

How can fix…??? T_T


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

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0'     // <-Error Here!!!
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
}

Which library version are you using? E.g. 3.6.0.

**Which phone/tablet are you using, and which Android version does it run? ** galaxy s4

Does the same happen on other devices or an emulator? same happen on other emulator

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
rkistnercommented, Dec 10, 2018

The main library is an aar file anyway, even without the @aar annotation. I suspect that specifying explicitly does roughly the same as this:

implementation('com.journeyapps:zxing-android-embedded:3.6.0') { transitive = false }

Which basically says “use this library, but none of its dependencies”.

3reactions
solusoftekcommented, Dec 10, 2018

Hi, I think the @aar annotation implements a compiled binary, while without that annotation it drops a copy of the repository to be compiled with your project and that’s where the error appears

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to Resolve: 'com.android.support:appcompat-v7' No ...
In the messages, it gives me the option to Install Repository and sync project , and thats where my problem begins. No matter...
Read more >
Support Library Revision Archive - Android Developers
Important: There is a known bug in the android.support.v7.media.MediaRouter class in revision 25.1.1 and 25.1.0 of the Support Library.
Read more >
Could not find any version that matches appcompat v7.30
How to fix Error in Android Studio :could not find any version that matches com. android.support : appcompat - v7 :30.+.
Read more >
[Solved] All com.android.support libraries must use ... - YouTube
Solving the Android Studio error in gradle file with implementation dependencies of API 28 Android.The text of error is:All ...
Read more >
Solved error with AppCompat 27 - Advanced
Open your project Navigate to the first build.gradle file in your app structure Add “mavenCentral()” to your repositories Now add AppCompat ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found