android-shape-imageview | Custom shaped android imageview components

 by   siyamed Java Updated: 5 months ago - 0.9.3 License: MIT

Download this library from

Build Applications

kandi X-RAY | android-shape-imageview REVIEW AND RATINGS

Custom shaped android imageview components

kandi-support
Support

  • android-shape-imageview has a medium active ecosystem.
  • It has 2616 star(s) with 606 fork(s).
  • It had no major release in the last 12 months.
  • On average issues are closed in 135 days.
  • It has a neutral sentiment in the developer community.

quality kandi
Quality

  • android-shape-imageview has 9 bugs (0 blocker, 0 critical, 1 major, 8 minor) and 122 code smells.

security
Security

  • android-shape-imageview has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • android-shape-imageview code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.

license
License

  • android-shape-imageview is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.

build
Reuse

  • android-shape-imageview releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • android-shape-imageview saves you 1567 person hours of effort in developing the same functionality from scratch.
  • It has 3486 lines of code, 226 functions and 60 files with 0 % test coverage
  • It has high code complexity. Code complexity directly impacts maintainability of the code.
Top functions reviewed by kandi - BETA

kandi has reviewed android-shape-imageview and discovered the below as its top functions. This is intended to give you an instant insight into android-shape-imageview implemented functionality, and help decide if they suit your requirements.

  • Create a path from a string .
  • Start an element .
  • Parses a float .
  • Parse numbers .
  • Parse a transform item .
  • Calculate the path .
  • Calculates the size of the bitmap in pixels .
  • Convert units to units .
  • Configures the bounds of the bitmap .
  • Create the mask canvas .

android-shape-imageview Key Features

Custom shaped android imageview components

android-shape-imageview examples and code snippets

  • How to use
  • Proguard
  • AAPT: error: resource android:attr/android:progressBarStyleSmall not found
  • Android Studio preview doesn't show when a floating action button is in the layout
  • Why Android studio is giving error after implementing 'constraintlayout:2.0.0-beta1'
  • I'm stuck when i try to use android-image-cropper:2.8.+
  • Gradle Multi module annotationProcessor compilation issue between Room Database And Glide Plugins
  • java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzaqa$zza.class
  • Error resolving gradle issue...Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'
  • Failed to resolve: `com.google.android.gms:play-services-appindexing:8.4.0`
  • Error retrieving parent for item: No resource found that matches the given name android
  • Android: force gradle to include only one version of a library

How to use

compile 'com.github.siyamed:android-shape-imageview:0.9.+@aar'

Proguard

-dontwarn android.support.v7.**
-keep class android.support.v7.** { ; }
-keep interface android.support.v7.* { ; }
-keepattributes *Annotation,Signature
-dontwarn com.github.siyamed.**
-keep class com.github.siyamed.shapeimageview.**{ *; }

AAPT: error: resource android:attr/android:progressBarStyleSmall not found

<ProgressBar
            android:gravity="center"
            android:visibility="gone"
            android:id="@+id/magic_reload_progress"
            android:layout_centerInParent="true"
            style="?android:attr/android:progressBarStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
<ProgressBar
            android:gravity="center"
            android:visibility="gone"
            android:id="@+id/magic_reload_progress"
            android:layout_centerInParent="true"
            style="?android:attr/progressBarStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
-----------------------
<ProgressBar
            android:gravity="center"
            android:visibility="gone"
            android:id="@+id/magic_reload_progress"
            android:layout_centerInParent="true"
            style="?android:attr/android:progressBarStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
<ProgressBar
            android:gravity="center"
            android:visibility="gone"
            android:id="@+id/magic_reload_progress"
            android:layout_centerInParent="true"
            style="?android:attr/progressBarStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
-----------------------
implementation 'com.payumoney.sdkui:plug-n-play:1.6.0'
-----------------------
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:dots="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/transparent"
    android:clickable="true"
    android:gravity="center"
    android:orientation="vertical">

    <LinearLayout
        android:id="@+id/magic_retry_parent"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dp"
        android:layout_marginRight="10dp"
        android:background="@android:color/white"
        android:gravity="center"
        android:orientation="vertical"
        android:paddingTop="15dp"
        android:paddingBottom="15dp"
        android:visibility="visible">

        <ImageView
            android:id="@+id/retry_btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:background="@drawable/ripple_drawable"
            android:padding="15dp"
            android:src="@drawable/ic_refresh_black_36dp" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="30dp"
            android:gravity="center"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="30dp"
                android:layout_marginLeft="5dp"
                android:drawableRight="@drawable/trusticon"
                android:drawablePadding="@dimen/four"
                android:gravity="center_vertical"
                android:textColor="@color/cb_textColor"
                android:textSize="@dimen/twelveScaled"
                android:textStyle="bold" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="30dp"
                android:layout_marginLeft="@dimen/four"
                android:drawablePadding="@dimen/four"
                android:gravity="center_vertical"
                android:text="Powered by"
                android:textColor="@color/cb_textColor"
                android:textSize="15sp"
                android:textStyle="normal"

                />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="20dp"
                android:layout_marginLeft="@dimen/four"
                android:drawableLeft="@drawable/logo_payu"
                android:drawablePadding="@dimen/four"
                android:gravity="center"
                android:textColor="@color/cb_textColor"
                android:textSize="@dimen/twelveScaled"
                android:textStyle="bold" />
        </LinearLayout>

        <TextView
            android:id="@+id/error_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:fontFamily="sans-serif-light"
            android:text="@string/MR_Error_text"
            android:textColor="@android:color/black"
            android:textSize="18sp" />

        <TextView
            android:id="@+id/error_title2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:fontFamily="sans-serif-light"
            android:text="@string/MR_Tap_retry_text"
            android:textColor="@android:color/black"
            android:textSize="18sp" />

        <!-- Button
            android:visibility="gone"
            android:text="@string/b_cancel"
            android:id="@+id/cancel"
            android:layout_width="150dp"
            android:layout_height="36dp"
            android:background="@drawable/approve_otp_button"
            style="@style/approve_otp"
            android:textSize="12sp"
            android:paddingRight="@dimen/eight"
            android:paddingLeft="@dimen/eight"
            android:textStyle="bold"/ -->


    </LinearLayout>

    <LinearLayout
        android:id="@+id/waiting_dots_parent"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:background="@android:color/white"
        android:gravity="center"
        android:orientation="vertical"
        android:visibility="gone">


        <ProgressBar
            android:id="@+id/magic_reload_progress"
            style="?android:attr/progressBarStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:gravity="center"
            android:visibility="gone" />
    </LinearLayout>

</LinearLayout>

Android Studio preview doesn't show when a floating action button is in the layout

FloatingButton btnFab = (FloatingButton) findViewById(R.id.btn_fab) // Not FloatingActionButton
<!-- Not FloatingButton -->
<com.example.FloatingActionButton 
     android:id="@+id/btn_fab"
     android:layout_width = "45dp"
     android:layout_height = "45dp"
     />
-----------------------
FloatingButton btnFab = (FloatingButton) findViewById(R.id.btn_fab) // Not FloatingActionButton
<!-- Not FloatingButton -->
<com.example.FloatingActionButton 
     android:id="@+id/btn_fab"
     android:layout_width = "45dp"
     android:layout_height = "45dp"
     />
-----------------------
implementation 'com.google.android.material:material:1.1.0-alpha07'
android.enableJetifier=true
android.useAndroidX=true
-----------------------
implementation 'com.google.android.material:material:1.1.0-alpha07'
android.enableJetifier=true
android.useAndroidX=true
-----------------------
android:elevation 
app:elevation
-----------------------
android:elevation 
app:elevation
-----------------------
<android.support.design.widget.FloatingActionButton
            android:id="@+id/fab"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|end"
            android:layout_margin="@dimen/fab_margin"
            app:srcCompat="@drawable/ic_done_24dp" />
    </android.support.design.widget.CoordinatorLayout>
-----------------------
<com.google.android.material.floatingactionbutton.FloatingActionButton
   android:id="@+id/share"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:layout_gravity="bottom|end"
   android:layout_margin="16dp"
   app:srcCompat="@drawable/ic_share_white_24dp"/>
implementation "com.github.martipello:FloatingActionButton:v2.0"
-----------------------
<com.google.android.material.floatingactionbutton.FloatingActionButton
   android:id="@+id/share"
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:layout_gravity="bottom|end"
   android:layout_margin="16dp"
   app:srcCompat="@drawable/ic_share_white_24dp"/>
implementation "com.github.martipello:FloatingActionButton:v2.0"

Why Android studio is giving error after implementing 'constraintlayout:2.0.0-beta1'

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-annotations:27.1.1'
annotationProcessor 'com.android.support:support-annotations:27.1.1'

I'm stuck when i try to use android-image-cropper:2.8.+

implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
configurations.all {
 resolutionStrategy.eachDependency {  details ->
    def requested = details.requested
    if (requested.group == 'com.android.support') {
        if (!requested.name.startsWith("multidex")) {
            details.useVersion "28.0.0"
        }
    }
  }
}
-----------------------
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
configurations.all {
 resolutionStrategy.eachDependency {  details ->
    def requested = details.requested
    if (requested.group == 'com.android.support') {
        if (!requested.name.startsWith("multidex")) {
            details.useVersion "28.0.0"
        }
    }
  }
}
-----------------------
implementation com.theartofdev.edmodo:android-image-cropper:2.8.+
android.useAndroidX=true
android.enableJetifier=true
-----------------------
implementation com.theartofdev.edmodo:android-image-cropper:2.8.+
android.useAndroidX=true
android.enableJetifier=true
-----------------------
dependencies {
api "androidx.appcompat:appcompat:$androidXLibraryVersion"
implementation "androidx.exifinterface:exifinterface:$androidXLibraryVersion"
}
dependencies {
api "com.android.support:appcompat-v7:28.0.0"
implementation "com.android.support:exifinterface:28.0.0"
}
-----------------------
dependencies {
api "androidx.appcompat:appcompat:$androidXLibraryVersion"
implementation "androidx.exifinterface:exifinterface:$androidXLibraryVersion"
}
dependencies {
api "com.android.support:appcompat-v7:28.0.0"
implementation "com.android.support:exifinterface:28.0.0"
}

Gradle Multi module annotationProcessor compilation issue between Room Database And Glide Plugins

allprojects {
repositories {
    jcenter()
    google()
 }

java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzaqa$zza.class

compile 'com.google.firebase:firebase-database:10.2.6'
compile 'com.google.firebase:firebase-storage:10.2.6'
compile 'com.google.firebase:firebase-auth:10.2.6'
compile 'com.google.firebase:firebase-appindexing:10.0.0'
 compile 'com.google.firebase:firebase-database:10.2.6'
 compile 'com.google.firebase:firebase-storage:10.2.6'
 compile 'com.google.firebase:firebase-auth:10.2.6'
 compile 'com.google.firebase:firebase-appindexing:10.2.6'
-----------------------
compile 'com.google.firebase:firebase-database:10.2.6'
compile 'com.google.firebase:firebase-storage:10.2.6'
compile 'com.google.firebase:firebase-auth:10.2.6'
compile 'com.google.firebase:firebase-appindexing:10.0.0'
 compile 'com.google.firebase:firebase-database:10.2.6'
 compile 'com.google.firebase:firebase-storage:10.2.6'
 compile 'com.google.firebase:firebase-auth:10.2.6'
 compile 'com.google.firebase:firebase-appindexing:10.2.6'

Error resolving gradle issue...Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'

 Firebase Core          com.google.firebase:firebase-core:15.0.2
    Ads                 com.google.firebase:firebase-ads:15.0.0
  Analytics             com.google.firebase:firebase-analytics:15.0.2
 App Indexing           com.google.firebase:firebase-appindexing:15.0.0
 Authentication         com.google.firebase:firebase-auth:15.1.0
Cloud Firestore         com.google.firebase:firebase-firestore:16.0.0
Cloud Functions         com.google.firebase:firebase-functions:15.0.0
Cloud Messaging         com.google.firebase:firebase-messaging:15.0.2
Cloud Storage           com.google.firebase:firebase-storage:15.0.2
Crash Reporting         com.google.firebase:firebase-crash:15.0.2
Crashlytics             com.crashlytics.sdk.android:crashlytics:2.9.1
Invites                 com.google.firebase:firebase-invites:15.0.2
Performance Monitoring  com.google.firebase:firebase-perf:15.1.0
Realtime Database       com.google.firebase:firebase-database:15.0.0
Remote Config           com.google.firebase:firebase-config:15.0.2

Failed to resolve: `com.google.android.gms:play-services-appindexing:8.4.0`

compile 'com.google.firebase:firebase-appindexing:10.0.0' 
-----------------------
compile 'com.google.firebase:firebase-appindexing:10.0.0' 

Error retrieving parent for item: No resource found that matches the given name android

compile 'com.android.support:recyclerview-v7:25.0.1'

Android: force gradle to include only one version of a library

configurations.all { 
    resolutionStrategy.force 'com.android.support:support-v4:24.0.0'
}

COMMUNITY DISCUSSIONS

Top Trending Discussions on android-shape-imageview
  • AAPT: error: resource android:attr/android:progressBarStyleSmall not found
  • IOException cannot delete path
  • Failed in linking file
  • Android Studio preview doesn't show when a floating action button is in the layout
  • Why Android studio is giving error after implementing 'constraintlayout:2.0.0-beta1'
  • I'm stuck when i try to use android-image-cropper:2.8.+
  • Gradle Multi module annotationProcessor compilation issue between Room Database And Glide Plugins
  • org.gradle.internal.component.AmbiguousVariantSelectionException
  • java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzaqa$zza.class
  • "All com.android.support libraries must use the exact same version specification" does not want to go away
Top Trending Discussions on android-shape-imageview

QUESTION

AAPT: error: resource android:attr/android:progressBarStyleSmall not found

Asked 2020-Mar-31 at 05:07

C:\Users\Admin.gradle\caches\transforms-2\files-2.1\9f39f95ecc02dcabb161a6205cd680b4\jetified-magicretry-1.0.6\res\layout-v11\magicretry_fragment.xml:121: AAPT: error: resource android:attr/android:progressBarStyleSmall not found.

I am using PayuMoney payment gateway SDK I am getting this error after migrating to AndroidX.

Please help me to solve this issue.

build.gradle file

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        applicationId "com.sk.sk"
        minSdkVersion 20
        targetSdkVersion 28
        versionCode 23
        versionName "2.0"
        multiDexEnabled true
    }
    useLibrary 'org.apache.http.legacy'
    buildTypes {
        debug {
            debuggable true
        }
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
        main { assets.srcDirs = ['src/main/assets', 'app/', 'android_assets', 'android_asset'] }
    }
    dexOptions {
        javaMaxHeapSize "4g"
    }
}
repositories {
    mavenCentral()
}
dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    testImplementation 'junit:junit:4.12'
    implementation files('libs/android-async-http-1.4.2.jar')
    implementation files('libs/PGSDK_v1.0.1.jar')
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'com.facebook.android:facebook-android-sdk:4.0.0'
    implementation 'com.googlecode.android-query:android-query:0.25.9'
    implementation 'com.google.android.gms:play-services:12.0.1'
    implementation 'com.google.android.gms:play-services-analytics:17.0.0'
    implementation 'ch.acra:acra:4.6.1'
    implementation 'uk.co.chrisjenx:calligraphy:2.2.0'
    implementation 'com.jpardogo.materialtabstrip:library:1.1.0'
    implementation 'com.koushikdutta.urlimageviewhelper:urlimageviewhelper:1.0.4'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.2.+'
    implementation 'com.github.siyamed:android-shape-imageview:0.9.3@aar'
    implementation files('libs/core-2.1.jar')
    implementation project(':linkedin-sdk')
    implementation 'com.payumoney.sdkui:plug-n-play:1.5.0'
    //implementation 'com.payumoney.core:payumoney-sdk:7.5.0'
    //implementation project(':sdkui')
}

ANSWER

Answered 2019-Aug-21 at 10:27

Try their latest SDK version which is 1.5.0 at the moment

Source https://stackoverflow.com/questions/57588753

QUESTION

IOException cannot delete path

Asked 2020-Jan-08 at 05:01

I get this error in one of my projects.

FAILURE: Build failed with an exception.

  • What went wrong:

    Execution failed for task ':app:transformClassesWithDesugarForDevServerDebug'. com.android.build.api.transform.TransformException: java.io.IOException: Could not delete path 'D:\Android\Projects\uralenergo\app\build\intermediates\transforms\desugar\devServer\debug\1.jar'.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

    BUILD FAILED in 9s

I very often work on this project, and I'm tired of seeing this error in 40% of the cases when I trying to run my app on my phone.

If I do Rebuild Project, the error disappears and the application is compiled. But after 2-3 times to build the application, this error appears again.

The project is very large, and I can not waste my time on the Rebuild Project. I tried to delete this folder manually. But it did not help me.

build.gradle file:

buildscript {
    ext.kotlin_version = '1.2.3-1'
    repositories {
        jcenter()
        mavenCentral()
        maven { url 'https://maven.fabric.io/public' }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0'
        classpath "io.realm:realm-gradle-plugin:3.7.1"
        classpath 'io.fabric.tools:gradle:1.24.4'
        classpath 'com.google.gms:google-services:3.2.0'
    }
}

allprojects{
    repositories{
        jcenter()
        google()
    }
}

apply plugin: 'idea'
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'

repositories {
    jcenter()
    mavenCentral()
    maven { url 'https://maven.fabric.io/public' }
    maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }
    maven { url 'https://jitpack.io' }
    maven { url 'https://maven.google.com' }
    google()
}

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    flavorDimensions "versionCode"
    defaultConfig {
        applicationId "com.softjet.uralenergo"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode 122
        versionName "1.1.5"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        multiDexEnabled true
    }


    dexOptions {
        javaMaxHeapSize "4g"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    packagingOptions {
        exclude 'META-INF/rxjava.properties'
    }

    signingConfigs {
        debug {
            storeFile file("keys\\debug_key.jks")
            storePassword "xxx"
            keyAlias "xxx"
            keyPassword "xxx"
        }
        release {
            def keystorePropertiesFile = file("keys\\release.properties")
            if (keystorePropertiesFile.exists()) {
                def keystoreProperties = new Properties()
                keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

                keyAlias keystoreProperties['keyAlias']
                keyPassword keystoreProperties['keyPassword']
                storeFile file(keystoreProperties['storeFile'])
                storePassword keystoreProperties['storePassword']
            } else {
                return null
            }
            keyAlias 'xxx'
            keyPassword 'xxx'
            storeFile file('D:/Android/Projects/uralenergo/keystore/release_key.jks')
            storePassword 'xxx'
        }
    }

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

    productFlavors {
        devServer {
            applicationIdSuffix ".debug"
        }
        prodServer {
            applicationIdSuffix ""
        }
    }

    configurations.all {
        resolutionStrategy {
            force 'com.google.guava:guava:24.1-jre'
            force 'com.google.guava:guava-gwt:24.1-jre'
        }
    }
}

def renameAPK(variant) {
    variant.outputs.each { output ->
        def file = output.packageApplication.outputFile
        def lastSuffix = getVersionNameSuffix(variant)
        def fileName = rootProject.name + " v" + variant.versionName + lastSuffix + ".apk"
        output.packageApplication.outputFile = new File(file.parent, fileName)
    }
}

static def getVersionNameSuffix(variant) {
    def flavorName = variant.flavorName
    def buildType = variant.buildType.name

    if (buildType == "debug") {
        if (flavorName == "prodServer")
            return "a"
        if (flavorName == "devServer")
            return "-debug"
    }
    if (buildType == "release") {
        if (flavorName == "prodServer")
            return "-release"
        if (flavorName == "devServer")
            return "-debug-signed"
    }
    throw new RuntimeException("Unsupported variant: build type=" + buildType + " and flavorName=" + flavorName)
}

task assembleDevServerDebugAndProdServerRelease {
    group = 'custom_assemble'
    dependsOn 'assembleDevServerDebug'
    dependsOn 'assembleProdServerRelease'
}

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '27.1.1'
            }
        }
    }
}

ext {
    supportLibraryVersion = "27.1.1"
    googlePlayServicesVersion = "12.0.1"
    daggerVersion = "2.11"
    okhttpVersion = "3.5.0"
    retrofitVersion = "2.1.0"
    butterKnifeVersion = "8.8.1"
    permissionsDispatcherVersion = "2.4.0"
    glideVersion = "4.1.1"
    materialDialogsVersion = "0.9.4.7"
    flipboardBottomSheetVersion = "1.5.3"
    junitVersion = "4.12"
}

dependencies {

    //Jars
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    //Support Libs
    implementation "com.android.support:support-v4:$supportLibraryVersion"
    implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
    implementation "com.android.support:design:$supportLibraryVersion"
    implementation "com.android.support:cardview-v7:$supportLibraryVersion"
    implementation "com.android.support:gridlayout-v7:$supportLibraryVersion"
    implementation 'com.android.support:multidex:1.0.3'

    //Google
    implementation "com.google.android.gms:play-services-gcm:$googlePlayServicesVersion"
    implementation "com.google.android.gms:play-services-maps:$googlePlayServicesVersion"

    //Firebase
    implementation "com.google.firebase:firebase-core:$googlePlayServicesVersion"
    implementation "com.google.firebase:firebase-messaging:$googlePlayServicesVersion"

    //Dagger2
    implementation "com.google.dagger:dagger:$daggerVersion"
    annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"

    //Rx
    implementation 'io.reactivex:rxandroid:1.2.1'
    implementation 'io.reactivex:rxjava:1.3.0'

    //Ok Http
    implementation "com.squareup.okhttp3:logging-interceptor:$okhttpVersion"
    implementation "com.squareup.okhttp3:okhttp:$okhttpVersion"
    implementation "com.squareup.okhttp3:okhttp-urlconnection:$okhttpVersion"

    //Retrofit2
    implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
    implementation "com.squareup.retrofit2:adapter-rxjava:$retrofitVersion"
    implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
    implementation("com.squareup.retrofit2:converter-simplexml:$retrofitVersion") {
        exclude group: 'xpp3', module: 'xpp3'
        exclude group: 'stax', module: 'stax-api'
        exclude group: 'stax', module: 'stax'
    }

    //    //Pushbots

    //    implementation 'com.pushbots:pushbots-lib:3.0.1@aar'

    //Butter Knife
    implementation "com.jakewharton:butterknife:$butterKnifeVersion"
    annotationProcessor "com.jakewharton:butterknife-compiler:$butterKnifeVersion"

    //Realm
    annotationProcessor 'dk.ilios:realmfieldnameshelper:1.1.1'

    //Permissions Dispatcher
    implementation "com.github.hotchemi:permissionsdispatcher:$permissionsDispatcherVersion"
    annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:$permissionsDispatcherVersion"

    //Crashlytics
    implementation('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
        transitive = true
    }

    //Picasso
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'

    //Glide
    implementation "com.github.bumptech.glide:glide:$glideVersion"
    annotationProcessor "com.github.bumptech.glide:compiler:$glideVersion"
    implementation "com.github.bumptech.glide:okhttp3-integration:$glideVersion"

    //GestureImageView
    implementation 'com.alexvasilkov:gesture-views:2.4.1'

    //Material Design Additional Libs

    //--Dialogs
    implementation "com.afollestad.material-dialogs:core:$materialDialogsVersion"
    implementation "com.afollestad.material-dialogs:commons:$materialDialogsVersion"

    //--Better Spinner
    implementation 'com.weiwangcn.betterspinner:library-material:1.1.0'

    //--Search View
    implementation 'com.miguelcatalan:materialsearchview:1.4.0'

    //--Help Screen
    implementation 'com.github.apl-devs:appintro:v4.2.2'

    //Shape ImageView
    implementation 'com.github.siyamed:android-shape-imageview:0.9.3@aar'

    //Circular Image View
    implementation 'com.mikhaellopez:circularimageview:3.0.2'

    //Animations
    implementation 'com.daimajia.easing:library:2.0@aar'
    implementation 'com.daimajia.androidanimations:library:2.2@aar'

    //Input Mask
    implementation 'com.redmadrobot:inputmask:2.2.1'

    //Autofit Text View
    implementation 'me.grantland:autofittextview:0.2.1'

    //View Pager Indicator
    implementation 'com.romandanylyk:pageindicatorview:0.1.2@aar'

    //Expandable Layout
    implementation 'com.github.aakira:expandable-layout:1.6.0@aar'

    //Multi Slider
    implementation 'io.apptik.widget:multislider:1.3'

    //Pdf Viewer
    implementation 'com.github.barteksc:android-pdf-viewer:2.5.1'

    //Barcode (QR) scanner
    implementation 'me.dm7.barcodescanner:zxing:1.9.4'

    //Bottom Sheet
    implementation "com.flipboard:bottomsheet-core:$flipboardBottomSheetVersion"
    implementation "com.flipboard:bottomsheet-commons:$flipboardBottomSheetVersion"

    //Metricas
    implementation 'com.yandex.android:mobmetricalib:2.76'

    //Unit Tests
    testImplementation "junit:junit:$junitVersion"
    implementation "junit:junit:$junitVersion"

    //Android Tests
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
        exclude module: 'jsr305'
    })
}

//must be on the bottom
apply plugin: 'com.google.gms.google-services'

ANSWER

Answered 2018-Apr-09 at 14:01

This error happens because some process from previous build did not ended and is now locking that file/folder.

You can use Windows Process Explorer to check which process is locking that folder/file. Then, you just need to kill that process (windows task manager).

Link for Windows Process Explorer

If you don't want to use that Process Explorer, you can try to close Android Studio and the process may finish too. Or, you can just reboot your machine to kill all process.

I often use Windows Process Explorer. This way, I can find and kill the task without rebooting the PC...

Source https://stackoverflow.com/questions/49731210

QUESTION

Failed in linking file

Asked 2019-Sep-06 at 08:19

Dependency is appcompat dependency is underlined red and failed to build project fully

Changed all support libraries to use the compiledsdk version but still didnt work

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
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.android.support:cardview-v7:28.1.1'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation 'com.onesignal:OneSignal:3.10.7@aar'
implementation 'com.google.android.ads.consent:consent-library:1.0.7'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.github.ixiDev:GDPRChecker:v0.2'
implementation 'com.github.siyamed:android-shape-imageview:0.9.3@aar'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.github.arcadefire:nice-spinner:1.4.3'
implementation 'com.github.mjn1369:prettydialog:1.0.4'
implementation project(path: ':SmoothCheckBox-master')
implementation project(':androidsaripaarmaster')
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation project(':rating-view')
implementation project(':pinlockview')

That is the error message that shows: Compilation failed to complete

ANSWER

Answered 2019-Sep-06 at 08:19

Problem is in this dependency com.google.android.gms:play-services-location:17.0.0. This location dependency use androidX Libraries.

Solution is: Either downgrade this dependency version or migrate to Androidx (whole project dependencies)

Source https://stackoverflow.com/questions/57818131

QUESTION

Android Studio preview doesn't show when a floating action button is in the layout

Asked 2019-Jul-09 at 05:18

Exactly as the title suggests when I have a floating action button anywhere in my layout in any xml file the preview stops working, I can literally comment it out and it will instantly redraw perfectly. any ideas?

I have tried resetting multiple times syncing, invalidating caches etc. When i reset the view is rendered fine but only for pages open any i open after will not render and navigating back to the previously rendered layout breaks it

The only thing I can think of is I use clans floating action button in my project, but it's the Google one that breaks my preview.

EDIT I've removed clans cleaned project invalidated caches restarted and still the issue persists

also if i change FloatingActionButton to ExtendedFloatingActionButton the preview draws fine, looking into those two it seems they extend completely different classes

Also using AndroidX

here is an example of an xml that will not render

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context=".settings.PdfSettingsActivity">

<ImageView
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  app:layout_constraintBottom_toBottomOf="parent"
  app:layout_constraintStart_toStartOf="parent"
  app:layout_constraintEnd_toEndOf="parent"
  app:layout_constraintTop_toTopOf="parent"
  android:scaleType="centerCrop"
  android:layout_margin="@dimen/activity_vertical_margin_16dp"
  android:elevation="@dimen/activity_horizontal_margin_4dp"
  android:id="@+id/pdf_renderer"/>




<com.google.android.material.floatingactionbutton.FloatingActionButton
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/share"
    android:layout_margin="@dimen/activity_vertical_margin_16dp"
    android:src="@drawable/ic_share_white_24dp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintBottom_toBottomOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

if i comment out the floating action button the view immediately renders

com.google.android.material.floatingactionbutton.FloatingActionButton

Android Studio 3.4.1 Build #AI-183.6156.11.34.5522156, built on May 1, 2019 JRE: 1.8.0_152-release-1343-b01 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.14.3

EDIT

Just playing around with it now and I manage to make it throw an an error:

java.lang.IllegalArgumentException: java.lang.ClassCastException@54291cbb
at sun.reflect.GeneratedMethodAccessor971.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at android.animation.PropertyValuesHolder_Delegate.callMethod(PropertyValuesHolder_Delegate.java:108)
at android.animation.PropertyValuesHolder_Delegate.nCallFloatMethod(PropertyValuesHolder_Delegate.java:143)
at android.animation.PropertyValuesHolder.nCallFloatMethod(PropertyValuesHolder.java)
at android.animation.PropertyValuesHolder.access$400(PropertyValuesHolder.java:38)
at android.animation.PropertyValuesHolder$FloatPropertyValuesHolder.setAnimatedValue(PropertyValuesHolder.java:1387)
at android.animation.ObjectAnimator.animateValue(ObjectAnimator.java:990)
at android.animation.ValueAnimator.animateBasedOnTime(ValueAnimator.java:1339)
at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1471)
at android.animation.ValueAnimator.pulseAnimationFrame(ValueAnimator.java:1490)
at android.animation.AnimatorSet.pulseFrame(AnimatorSet.java:1163)
at android.animation.AnimatorSet.handleAnimationEvents(AnimatorSet.java:1146)
at android.animation.AnimatorSet.doAnimationFrame(AnimatorSet.java:1046)
at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
at android.animation.AnimationHandler.access$100(AnimationHandler.java:37)
at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:947)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer_Delegate.doFrame(Choreographer_Delegate.java:66)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:563)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:425)
at com.android.layoutlib.bridge.BridgeRenderSession.render(BridgeRenderSession.java:120)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:151)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:133)
at com.android.tools.idea.rendering.RenderTask.lambda$null$8(RenderTask.java:755)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

build.gradle dependencies

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//Room dependencies
implementation 'androidx.room:room-runtime:2.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation 'com.google.firebase:firebase-database:16.0.4'
implementation 'com.google.firebase:firebase-storage:16.0.4'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.firebase:firebase-client-android:2.4.0'
annotationProcessor 'androidx.room:room-compiler:2.1.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0-alpha01'
annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.2.0-alpha01"
//GSON
implementation 'com.google.code.gson:gson:2.8.5'
//UI design
implementation 'com.github.hotchemi:android-rate:1.0.1'
implementation "androidx.legacy:legacy-support-core-utils:1.0.0"
implementation 'com.google.android.material:material:1.1.0-alpha07'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha06'
implementation 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
implementation 'com.getkeepsafe.taptargetview:taptargetview:1.12.0'
implementation 'com.romandanylyk:pageindicatorview:1.0.3'
implementation 'com.github.VRGsoftUA:ParallaxView:1.0'
//Glide
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
//Edit image
implementation 'com.yashoid:instacropper:1.0.6'
// FloatingActionButton
implementation 'com.github.martipello:FloatingActionButton:v2.0'
//Navigation
implementation "androidx.navigation:navigation-fragment:2.1.0-alpha05"
// For Kotlin use navigation-fragment-ktx
implementation "androidx.navigation:navigation-ui:2.1.0-alpha05"
//material components
implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha4'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0-beta02'
//tests
testImplementation 'org.json:json:20180130'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test:rules:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'
implementation 'androidx.test.espresso:espresso-idling-resource:3.2.0'
androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
implementation 'org.apache.commons:commons-lang3:3.8.1'
}

ANSWER

Answered 2019-Jun-26 at 13:27

I guess your cast in Activity or Fragment is written wrong.

Check you imported correct FloatingActionButton class. And it is correspond with your View in xml.

For example,

FloatingButton btnFab = (FloatingButton) findViewById(R.id.btn_fab) // Not FloatingActionButton

in your xml.

<!-- Not FloatingButton -->
<com.example.FloatingActionButton 
     android:id="@+id/btn_fab"
     android:layout_width = "45dp"
     android:layout_height = "45dp"
     />

Check if the class names are matched.

Source https://stackoverflow.com/questions/56767376

QUESTION

Why Android studio is giving error after implementing 'constraintlayout:2.0.0-beta1'

Asked 2019-May-17 at 12:35

I'm trying to use Android Motion layout and for that implemented androidx.constraintlayout:constraintlayout:2.0.0-beta1

but during build time I'm getting this error.

I've already tried downgrading to the alph4 version of constraintlayout

Android resource compilation failed E:\Users\avinash91625\StudioProjects\StanBuzzAndroid\app\build\intermediates\incremental\mergeFreemiumDebugResources\merged.dir\values\values.xml:5753: error: duplicate value for resource 'attr/circleRadius' with config ''. E:\Users\avinash91625\StudioProjects\StanBuzzAndroid\app\build\intermediates\incremental\mergeFreemiumDebugResources\merged.dir\values\values.xml:5753: error: resource previously defined here. E:\Users\avinash91625\StudioProjects\StanBuzzAndroid\app\build\intermediates\incremental\mergeFreemiumDebugResources\merged.dir\values\values.xml: error: file failed to compile.

My app gradle file -

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.firebase.firebase-perf'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId 'com.stanbuzz.android'
        minSdkVersion 21
        targetSdkVersion 28
        versionName '1.17'
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        versionCode 17
        renderscriptTargetApi 25
        renderscriptSupportModeEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    freemium {
        dimension = 'release'
        minSdkVersion 21
        versionCode = 21
    }
    }
    flavorDimensions 'release'
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.mikhaellopez:circularimageview:3.2.0'
    implementation 'info.hoang8f:android-segmented:1.0.6'
    implementation 'com.android.volley:volley:1.1.1'
    implementation 'com.github.ybq:Android-SpinKit:1.2.0'
    implementation 'com.google.firebase:firebase-core:16.0.9'
    implementation 'com.google.firebase:firebase-auth:17.0.0'
    implementation 'com.google.firebase:firebase-firestore:19.0.0'
    implementation 'com.google.firebase:firebase-inappmessaging-display:17.1.1'
    implementation 'com.google.firebase:firebase-storage:17.0.0'
    implementation 'com.google.firebase:firebase-perf:17.0.0'
    implementation 'com.firebaseui:firebase-ui-firestore:4.3.0'
    implementation 'com.firebaseui:firebase-ui-storage:4.3.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'com.github.bumptech.glide:glide:4.8.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
    implementation 'com.squareup.retrofit2:retrofit:2.4.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
    implementation 'com.scottyab:aescrypt:0.0.1'
    implementation 'com.budiyev.android:code-scanner:2.0.1'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.msg91.sendotp.library:library:3.1'
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
    implementation 'com.google.firebase:firebase-dynamic-links:17.0.0'
    implementation 'com.google.firebase:firebase-messaging:18.0.0'
    implementation 'com.google.firebase:firebase-functions:17.0.0'
    implementation 'com.github.siyamed:android-shape-imageview:0.9.3@aar'
    implementation 'com.google.android.gms:play-services-maps:16.1.0'
    implementation 'com.yarolegovich:discrete-scrollview:1.4.9'
    implementation 'com.algolia:algoliasearch-android:3.26.1'
    implementation 'com.google.android.gms:play-services-gcm:16.1.0'
    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.squareup.okhttp:okhttp:2.7.5'
    implementation 'io.smooch:core:5.16.2'
    implementation 'io.smooch:ui:5.16.2'
    implementation 'com.github.javiersantos:MaterialStyledDialogs:2.1'
    implementation 'com.razorpay:checkout:1.5.2'
    implementation 'com.github.takusemba:spotlight:1.8.0'
    implementation 'com.github.sujithkanna:smileyrating:1.6.8'
    implementation 'com.orhanobut:dialogplus:1.11@aar'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.ncorti:slidetoact:0.6.0'
    implementation 'com.github.canner:android-stepsview:1.2'
    implementation 'pl.bclogic:pulsator4droid:1.0.3'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta1'
     // Temporary fix begin
    implementation 'com.android.support:support-annotations:27.1.1'
    annotationProcessor 'com.android.support:support-annotations:27.1.1'
    androidTestImplementation 'androidx.test:rules:1.1.2-alpha01'
    // Temporary fix end
}
apply plugin: 'com.google.gms.google-services'

E:\Users\avinash91625\StudioProjects\StanBuzzAndroid\app\build\intermediates\incremental\mergeFreemiumDebugResources\merged.dir\values\values.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="orange">#fffaaa00</color>
    <color name="primary">#03A9F4</color>
    <color name="white">#fff</color>
    <color name="yellow">#ffff981e</color>
    <declare-styleable name="StepsView"><attr format="integer" name="numOfSteps"/><attr format="integer" name="completePosition"/><attr format="reference" name="labels"/><attr format="reference" name="barColor"/><attr format="reference" name="progressColor"/><attr format="reference" name="labelColor"/><attr format="reference" name="progressTextColor"/><attr format="boolean" name="hideProgressText"/><attr format="float" name="labelSize"/><attr format="float" name="progressMargin"/><attr format="float" name="circleRadius"/><attr format="float" name="progressStrokeWidth"/></declare-styleable>
    <string name="app_name">StepsView</string>
</resources>

I think this library is causing this issue - new AndroidX support

ANSWER

Answered 2019-May-17 at 10:28

@Avinash, Have you clean and build/ Invalidate Cache the project? If so this resource compilation error means that there are two resources sharing the same properties. In simple terms, you should remove android.support.constraint.ConstraintLayout before you import androidx.constraintlayout:constraintlayout:2.0.0-beta1. Hope this helpled

Source https://stackoverflow.com/questions/56184419

QUESTION

I'm stuck when i try to use android-image-cropper:2.8.+

Asked 2019-Mar-26 at 09:29

When i add to this line implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.+' in my dependency it cause error

* my error *

Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
    is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:8:5-25:19 to override.

And

implementation 'com.android.support:appcompat-v7:28.0.0'

this line become red line

I think the problem is reason of version

How can I avoid that clash?

I already try to change version and add code in manifest

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<usespermissionandroid:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

but it didn't work

This is my manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.blogapp">

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".Activities.LoginActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".Activities.RegisterActivity" />
        <activity android:name=".Activities.PostActivity" />
        <activity android:name=".Activities.HomeActivity" />
    </application>

</manifest>

This is my dependency

apply plugin: 'com.android.application'

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

        }
    }



dependencies {

    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'com.android.support:appcompat-v7:28.0.0'

    implementation 'com.android.support.constraint:constraint-layout:1.1.3'

    implementation 'com.google.firebase:firebase-core:16.0.1'

    implementation 'com.google.firebase:firebase-auth:16.0.1'

    implementation 'com.google.firebase:firebase-storage:16.0.1'

    implementation 'com.google.firebase:firebase-database:16.0.1'

    implementation "com.wdullaer:materialdatetimepicker:3.6.4"

    implementation 'com.android.support:support-v4:28.0.0'

    implementation 'com.android.support:recyclerview-v7:28.0.0'

    implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.+'

    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.android.support:design:28.0.0'

    implementation 'de.hdodenhof:circleimageview:3.0.0'

    implementation 'com.github.siyamed:android-shape-imageview:0.9.3@aar'

    implementation 'com.github.bumptech.glide:glide:4.9.0'
}

apply plugin: 'com.google.gms.google-services'

I hope use this imageCropper no trouble in my dependency https://github.com/ArthurHub/Android-Image-Cropper

ANSWER

Answered 2019-Mar-26 at 09:04

Use version 2.7.0

implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'

version 2.8.0 uses androidx support libraries , so use it only if you use androidx support libraries in your project

Change log

2.8.0

  1. Fix crash on Android O (thx @juliooa)
  2. Update to support library to AndroidX (thx @mradzinski)
  3. Handle failure when selecting non image file (thx @uncledoc)
  4. More translations (thx @jkwiecien, @david-serrano)

EDIT :

Add this at the end of app level build.gradle file

configurations.all {
 resolutionStrategy.eachDependency {  details ->
    def requested = details.requested
    if (requested.group == 'com.android.support') {
        if (!requested.name.startsWith("multidex")) {
            details.useVersion "28.0.0"
        }
    }
  }
}

Credit to Eugen Pechanec

Source https://stackoverflow.com/questions/55349641

QUESTION

Gradle Multi module annotationProcessor compilation issue between Room Database And Glide Plugins

Asked 2018-Nov-12 at 05:38

below is my build.gradle file dependencies

dependencies {
    def room_version = "1.1.1"

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.android.support:design:28.0.0-alpha1'
    implementation 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.android.support:support-vector-drawable:28.0.0'
    implementation 'com.android.support:exifinterface:28.0.0'
    implementation 'com.bignerdranch.android:expandablerecyclerview:3.0.0-RC1'
    implementation('com.github.castorflex.verticalviewpager:library:19.0.1') {
        exclude group: 'com.android.support'
        exclude module: 'appcompat-v7'
        exclude module: 'support-v4'
    }
    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'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
    android {
        useLibrary 'org.apache.http.legacy'
    }
    implementation("com.github.bumptech.glide:glide:4.8.0") {
        exclude group: "com.android.support"
    }
    implementation 'com.google.firebase:firebase-core:16.0.4'
    implementation 'com.google.firebase:firebase-messaging:17.3.4'
    implementation "android.arch.persistence.room:runtime:$room_version"
    annotationProcessor "android.arch.persistence.room:compiler:$room_version"


}

I am using two plugin annotationProcessor one for Room database and other for Glide Plugin but as soon as i add annotationProcessor for Room Database. It seem GLide annotationProcessor is getting override and I am getting compilation error for Glide Plugin in my project. How to run both in my project ?

ANSWER

Answered 2018-Nov-12 at 04:05

Make sure your root gradle look like this:

allprojects {
repositories {
    jcenter()
    google()
 }

Source https://stackoverflow.com/questions/53255778

QUESTION

org.gradle.internal.component.AmbiguousVariantSelectionException

Asked 2018-Sep-28 at 13:05

After using gradle project as library in my android studio project I get the AmbiguousVariantSelectionException exceptions

This is the entire log file, I've named the library module libraryy

org.gradle.internal.component.AmbiguousVariantSelectionException: More than one variant of project :libraryy matches the consumer attributes: - Configuration ':libraryy:debugApiElements' variant android-aidl: - Found artifactType 'android-aidl' but wasn't required. - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'. - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'. - Required org.gradle.usage 'java-api' and found compatible value 'java-api'. - Configuration ':libraryy:debugApiElements' variant android-classes: - Found artifactType 'android-classes' but wasn't required. - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'. - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'. - Required org.gradle.usage 'java-api' and found compatible value 'java-api'. - Configuration ':libraryy:debugApiElements' variant android-manifest: - Found artifactType 'android-manifest' but wasn't required. - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'. - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'. - Required org.gradle.usage 'java-api' and found compatible value 'java-api'. - Configuration ':libraryy:debugApiElements' variant android-renderscript: - Found artifactType 'android-renderscript' but wasn't required. - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'. - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'. - Required org.gradle.usage 'java-api' and found compatible value 'java-api'. - Configuration ':libraryy:debugApiElements' variant jar: - Found artifactType 'jar' but wasn't required. - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'. - Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required. - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'. - Required org.gradle.usage 'java-api' and found compatible value 'java-api'. at org.gradle.api.internal.artifacts.transform.DefaultArtifactTransforms$AttributeMatchingVariantSelector.doSelect(DefaultArtifactTransforms.java:104) at org.gradle.api.internal.artifacts.transform.DefaultArtifactTransforms$AttributeMatchingVariantSelector.select(DefaultArtifactTransforms.java:89) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DefaultArtifactSet.select(DefaultArtifactSet.java:126) at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DefaultVisitedArtifactResults.select(DefaultVisitedArtifactResults.java:48) at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.select(DefaultLenientConfiguration.java:112) at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.select(DefaultLenientConfiguration.java:101) at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.getResolvedArtifacts(DefaultResolvedConfiguration.java:78) at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver$ErrorHandlingResolvedConfiguration.getResolvedArtifacts(ErrorHandlingConfigurationResolver.java:296) at sun.reflect.GeneratedMethodAccessor226.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.MethodMetaProperty$GetBeanMethodMetaProperty.getProperty(MethodMetaProperty.java:76) at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:64) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296) at com.google.gms.googleservices.GoogleServicesPlugin$_failOnVersionConflictForGroup_closure13.doCall(GoogleServicesPlugin.groovy:399) at sun.reflect.GeneratedMethodAccessor222.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at groovy.lang.Closure.call(Closure.java:414) at groovy.lang.Closure.call(Closure.java:430) at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:71) at org.gradle.util.ConfigureUtil.configureTarget(ConfigureUtil.java:160) at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:106) at org.gradle.util.ConfigureUtil$1.execute(ConfigureUtil.java:123) at org.gradle.internal.ImmutableActionSet$CompositeSet.execute(ImmutableActionSet.java:196) at org.gradle.internal.MutableActionSet.execute(MutableActionSet.java:35) at org.gradle.api.internal.DefaultDomainObjectCollection.doAdd(DefaultDomainObjectCollection.java:204) at org.gradle.api.internal.DefaultDomainObjectCollection.add(DefaultDomainObjectCollection.java:198) at com.android.build.gradle.AppExtension.addVariant(AppExtension.java:79) at com.android.build.gradle.internal.ApiObjectFactory.create(ApiObjectFactory.java:132) at com.android.build.gradle.BasePlugin.lambda$createAndroidTasks$6(BasePlugin.java:760) at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81) at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:746) at com.android.build.gradle.BasePlugin.lambda$null$4(BasePlugin.java:652) at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81) at com.android.build.gradle.BasePlugin.lambda$createTasks$5(BasePlugin.java:648) at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:91) at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:80) at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42) at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230) at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149) at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58) at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324) at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234) at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140) at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37) at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) at com.sun.proxy.$Proxy27.afterEvaluate(Unknown Source) at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:76) at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:70) at org.gradle.configuration.project.LifecycleProjectEvaluator.access$100(LifecycleProjectEvaluator.java:34) at org.gradle.configuration.project.LifecycleProjectEvaluator$ConfigureProject.run(LifecycleProjectEvaluator.java:110) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50) at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:666) at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:135) at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35) at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:62) at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38) at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuild.run(DefaultGradleLauncher.java:249) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.initialization.DefaultGradleLauncher.configureBuild(DefaultGradleLauncher.java:167) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:126) at org.gradle.initialization.DefaultGradleLauncher.getConfiguredBuild(DefaultGradleLauncher.java:104) at org.gradle.internal.invocation.GradleBuildController$2.call(GradleBuildController.java:87) at org.gradle.internal.invocation.GradleBuildController$2.call(GradleBuildController.java:84) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152) at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100) at org.gradle.internal.invocation.GradleBuildController.configure(GradleBuildController.java:84) at org.gradle.tooling.internal.provider.runner.ClientProvidedBuildActionRunner.run(ClientProvidedBuildActionRunner.java:64) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$1.run(RunAsBuildOperationBuildActionRunner.java:43) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:40) at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:47) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30) at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39) at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53) at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:57) at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:32) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25) at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43) at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:69) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:30) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:45) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72) at org.gradle.util.Swapper.swap(Swapper.java:38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) at java.lang.Thread.run(Thread.java:745)

And the build.gradle script

dependencies { implementation fileTree(include: ['.jar'], dir: 'libs') androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) implementation fileTree(include: ['.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.android.support:design:26.+' implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.android.support:support-v4:26.+' implementation 'com.thefinestartist:finestwebview:1.2.7' implementation 'com.github.d-max:spots-dialog:0.7@aar' implementation 'com.squareup.retrofit2:retrofit:2.3.0' implementation 'com.google.code.gson:gson:2.8.2' implementation 'com.squareup.retrofit2:converter-gson:2.1.0' implementation 'io.reactivex:rxjava:1.1.6' implementation 'io.reactivex:rxandroid:1.2.1' implementation 'com.squareup.okhttp:okhttp:2.7.2' implementation 'com.squareup.retrofit:retrofit:1.9.0' implementation 'com.squareup.picasso:picasso:2.4.0' implementation 'commons-codec:commons-codec:1.3' implementation 'com.github.siyamed:android-shape-imageview:0.9.+@aar' implementation 'com.google.firebase:firebase-messaging:17.0.0' implementation 'com.google.firebase:firebase-core:15.0.2' implementation 'com.google.firebase:firebase-auth:16.0.2' implementation 'com.google.firebase:firebase-database:16.0.1' implementation 'com.firebase:firebase-client-android:2.5.1' implementation 'com.firebaseui:firebase-ui:4.1.0' implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.15' implementation 'org.apache.commons:commons-lang3:3.6' implementation 'com.android.volley:volley:1.1.0' //implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0' implementation 'com.github.amlcurran.showcaseview:library:5.4.3' implementation 'com.android.support:multidex:1.0.3' testImplementation 'junit:junit:4.12' implementation 'com.android.support:recyclerview-v7:26.1.0' implementation 'com.android.support:cardview-v7:26.1.0' implementation 'com.firebase:firebase-jobdispatcher:0.8.5' implementation 'com.google.android.gms:play-services-maps:15.0.1' implementation 'com.flaviofaria:kenburnsview:1.0.7' implementation 'com.android.support:cardview-v7:26.1.0' //implementation 'com.applandeo:material-calendar-view:1.4.0' implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') { transitive = true } implementation 'com.google.firebase:firebase-core:16.0.1' implementation project(':libraryy') }

apply plugin: 'com.google.gms.google-services'

apply plugin: 'com.android.application'

ANSWER

Answered 2018-Sep-28 at 13:05

It seems that, you have more then one module named libraryy with the two y's at the end. Show a screenshot of your project's folder structure and post your build.gradle file and of course if you are using flavors show that as well.

But it seems you simply have more than one child module by this name. In order to find all of your references you will need to

  • Check your libs directories, make sure you don't have a lib there.
  • Check your build.gradle for repeat dependencies as well as settings.gradle for repeat includes
  • Check your transitive dependencies (aka your dependencies of your dependencies, you can check this by running gradle dependency command to review the tree
  • Lastly, check that your cache isn't messed up. You can do this in two ways.

1) you can review the contents of your iml files and idea specific files to see if it got added twice, or 2) you can simply delete all your "build" directories, and iml files and idea files. then reimport the project. You could also simply do File->Invalidate Cache and Restart to see if that resolves you.

Somewhere you have an extra pointer to this library, so start by checking those locations, if you don't find it still, then I would invalidate cache, and if that doesn't work then delete all the generated directories and import from gradle again, but I would be surprised if you don't find it in one of those places.

Source https://stackoverflow.com/questions/52537785

QUESTION

java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzaqa$zza.class

Asked 2018-Aug-31 at 09:22

I'm not sure what this error means.

my dependency file is

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:multidex:1.0.0'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.firebase:firebase-auth:10.2.6'
compile 'com.android.support:design:25.3.1'
compile 'com.weiwangcn.betterspinner:library:1.1.0'
compile 'com.google.firebase:firebase-database:10.2.6'
compile 'com.google.firebase:firebase-storage:10.2.6'
testCompile 'junit:junit:4.12'
compile 'com.android.support:recyclerview-v7:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.firebase:firebase-appindexing:10.0.0'

//adding glid library
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
    transitive = true;
}

} apply plugin: 'com.google.gms.google-services'

ANSWER

Answered 2018-Aug-31 at 09:22

In your gradle you have two different version google dependencies there 10.0.0 & 10.2.6

compile 'com.google.firebase:firebase-database:10.2.6'
compile 'com.google.firebase:firebase-storage:10.2.6'
compile 'com.google.firebase:firebase-auth:10.2.6'
compile 'com.google.firebase:firebase-appindexing:10.0.0'

your google dependencies must have same dependencies version

try changing like this:

 compile 'com.google.firebase:firebase-database:10.2.6'
 compile 'com.google.firebase:firebase-storage:10.2.6'
 compile 'com.google.firebase:firebase-auth:10.2.6'
 compile 'com.google.firebase:firebase-appindexing:10.2.6'

Source https://stackoverflow.com/questions/52100724

QUESTION

"All com.android.support libraries must use the exact same version specification" does not want to go away

Asked 2018-May-28 at 11:49

I've noticed today that I keep getting the following error in Gradle:

I have no idea which library is causing it. Ive tried to remove them one by one, or update ones I suspect, but no luck.

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
compile 'com.googlecode.plist:dd-plist:1.16'
compile 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
compile 'org.jsoup:jsoup:1.8.3'
compile 'com.google.android.gms:play-services-location:11.0.4'

Any help would be appreciated! Thanks

ANSWER

Answered 2018-May-28 at 11:49

Ok, so I found the issue. Turns out its renderscript, as seen in this: https://github.com/Dimezis/BlurView/issues/46

Hope this helps someone else out there!

Source https://stackoverflow.com/questions/50561189

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

VULNERABILITIES

No vulnerabilities reported

INSTALL android-shape-imageview

You can use android-shape-imageview like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the android-shape-imageview component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

SUPPORT

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

Implement android-shape-imageview faster with kandi.

  • Use the support, quality, security, license, reuse scores and reviewed functions to confirm the fit for your project.
  • Use the, Q & A, Installation and Support guides to implement faster.

Discover Millions of Libraries and
Pre-built Use Cases on kandi