No resource found that matches the given name: attr ‘android:keyboardNavigationCluster’. when updating to Support Library 26.0.0

I’ve got this issue while updating to the latest Support Library version 26.0.0 (https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-0): Error:(18, 21) No resource found that matches the given name: attr ‘android:keyboardNavigationCluster’. /…/app/build/intermediates/res/merged/beta/debug/values-v26/values-v26.xml Error:(15, 21) No resource found that matches the given name: attr ‘android:keyboardNavigationCluster’. Error:(18, 21) No resource found that matches the given name: attr ‘android:keyboardNavigationCluster’. Error:(15, 21) No resource … Read more

No version of NDK matched the requested version

After updating to Android Gradle plugin 3.6.0 (released Feb 24, 2020), several project independently started failing with: No version of NDK matched the requested version 20.0.5594570. Versions available locally: 21.0.6113669 It’s quite simple to “fix” this locally by installing the older expected ndk version: sdkmanager ‘ndk;20.0.5594570’ However, my question is: Where and how is this … Read more

The number of method references in a .dex file cannot exceed 64k API 17

I am building an app with SugarORM Library but when I try to build the project for API 17 (didn’t check for others) it shows build error. Information:Gradle tasks [:app:assembleDebug] :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2330Library UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72330Library UP-TO-DATE :app:prepareComAndroidSupportCardviewV72330Library UP-TO-DATE :app:prepareComAndroidSupportDesign2330Library UP-TO-DATE :app:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72330Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42330Library UP-TO-DATE :app:prepareComAndroidSupportSupportVectorDrawable2330Library UP-TO-DATE :app:prepareComAndroidVolleyVolley100Library UP-TO-DATE … Read more

How to use ThreeTenABP in Android Project

I’m asking this question because I’m new to Java and Android and I searched for hours trying to figure this out. The answer came from a combination of related answers, so I figured I would document what I learned for anyone else who may be struggling. See answer. I’m using Android Studio 2.1.2 and my … Read more

Manifest merger failed : uses-sdk:minSdkVersion 14

Since downloading the latest SDK and installing Android Studio, my project fails to build. I get the following message: Error:Gradle: Execution failed for task ‘:SampleProject:processProdDebugManifest’. > Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version L declared in library com.android.support:support-v4:21.0.0-rc1 28 Answers 28

Android Material and appcompat Manifest merger failed

I have next grade dependencies { implementation fileTree(dir: ‘libs’, include: [‘*.jar’]) implementation ‘com.android.support:appcompat-v7:28.0.0-rc01’ implementation ‘com.android.support.constraint:constraint-layout:1.1.2’ 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.google.android.material:material:1.0.0-rc01’ } But when I want to build app I get next log: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0-alpha3] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0-alpha3] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add ‘tools:replace=”android:appComponentFactory”‘ … Read more

Android buildscript repositories: jcenter VS mavencentral

The last time I used Android Studio, it generated .gradle files with mavencentral() buildscript repositories whereas now there’s jcenter(). Could anyone explain the issues connected with this. Are there any other repos? When should we switch them? What impact do they have on projects, modules, libs? Any other essentials for Android developers? Who’s responsible for … Read more

buildTypes cannot be applied to groovy.lang.Closure

I’m getting this warning in my project gradle file: Warning:(16, 5) ‘buildTypes’ cannot be applied to ‘(groovy.lang.Closure< com.android.build.gradle.internal.dsl.BuildType>)’ My buildTypes section is: buildTypes { debug { debuggable true } release { minifyEnabled true proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-project.txt’ } } I’m currently using Android Studio 1.1.0, compileSdkVersion 22, buildToolsVersion 22.0.0, and targetSdkVersion 22. I tried backing down … Read more

Could not find or load main class org.gradle.wrapper.GradleWrapperMain

I cleaned the whole project by deleting local directories like ~/.gradle, ~/.m2 ~./android and ~/workspace/project/.gradle and chosing File -> Invalidate Caches / Restart… in Android Studio. Now execution of the command ./gradlew leads to the following output: usr$ ./gradlew tasks Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain Needless to say, I deleted too … Read more