android-gradle

Android studio 3.0: Unable to resolve dependency for :app@dexOptions/compileClasspath': Could not resolve project :animators

孤街浪徒 提交于 2019-11-26 10:17:50
I migrate to Android studio 3.0. So, the project become unable to compile a module named ":animator" and it displays me this error: Error:Unable to resolve dependency for ':app@dexOptions/compileClasspath': Could not resolve project :animators. <a href="openFile:/home/mobilepowered/MobilePowered/MyInnovalee/trunk17-10-2017/app/build.gradle">Open File</a><br><a href="Unable to resolve dependency for ':app@dexOptions/compileClasspath': Could not resolve project :animators.">Show Details</a> and show details gives this log : Unable to resolve dependency for ':app@dexOptions/compileClasspath':

define LOCAL_SRC_FILES in ndk{} DSL

眉间皱痕 提交于 2019-11-26 08:53:04
I would like to know whether it is possible to define LOCAL_SRC_FILES in gradle.build ndk {} block. I am currently using: dependencies { classpath 'com.android.tools.build:gradle:1.3.0' } in my top level gradle.build file. My jni module gradle.build file looks like this: apply plugin: 'com.android.library' dependencies { compile fileTree(dir: 'libs', include: '*.jar') } android { compileSdkVersion 11 buildToolsVersion "22.0.1" def jniSrc = System.getProperty("user.home") + "/srcs/jni" defaultConfig { ndk { moduleName "core" stl "gnustl_shared" cFlags "-std=c++11" } } sourceSets { main {

How to disable gradle &#39;offline mode&#39; in android studio? [duplicate]

China☆狼群 提交于 2019-11-26 04:45:23
This question already has an answer here: No cached version of gradle 5 answers I am new to android studio IDE development. Every time when I imported a sample project that developed in the android studio, I am getting this error.. No cached version of com.android.tools.build:gradle:1.1.0 available for offline mode. Disable Gradle 'offline mode' and sync project. How can I solve this problem. 独步清风 Go to File -> Settings . And open the 'Build,Execution,Deployment' . Then open the Build Tools -> Gradle Then uncheck -> Offline work on the right. Click the OK button. Then Rebuild the Project. For

Android Studio: Gradle - build fails — Execution failed for task &#39;:dexDebug&#39;

人盡茶涼 提交于 2019-11-26 04:44:43
Error: Gradle: Execution failed for task ':vertretungsplan:dexDebug'. > Failed to run command: P:\Android-Studio\sdk\build-tools\18.0.1\dx.bat --dex --output P:\Projekte\VertretungsplanProject\vertretungsplan\build\libs\vertretungsplan-debug.dex P:\Projekte\VertretungsplanProject\vertretungsplan\build\classes\debug P:\Projekte\VertretungsplanProject\vertretungsplan\build\dependency-cache\debug P:\Android-Studio\sdk\extras\android\m2repository\com\android\support\support-v4\18.0.0\support-v4-18.0.0.jar P:\Projekte\VertretungsplanProject\vertretungsplan\libs\commons-io-2.4.jar P:\Projekte

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

吃可爱长大的小学妹 提交于 2019-11-26 04:18:59
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

How to use the legacy Apache HTTP client on Android Marshmallow?

情到浓时终转凉″ 提交于 2019-11-26 04:16:33
Background On Android Marshmallow, Google has completely removed the support of Apache HTTP client (link here ) because it doesn't have good performance compared to the alternatives. This might also be the cause for so many apps crashing on Android Marshmallow. The problem Google allows you to still use this API, just not as a built in one, by adding this line to the gradle file: useLibrary 'org.apache.http.legacy' So, this is what I did: dependencies { classpath 'com.android.tools.build:gradle:1.3.0' } And: android { compileSdkVersion 'android-MNC' buildToolsVersion "23.0.0 rc3" useLibrary

Error:(1, 0) Plugin with id &#39;com.android.application&#39; not found

泄露秘密 提交于 2019-11-26 03:13:42
This is my first attempt at Android Studio. I installed 0.8.0 and updated to 0.8.2. As soon as a project is created I get the error message: Error:(1, 0) Plugin with id 'com.android.application' not found C:\Users\Bob\AndroidStudioProjects\HelloAgain6\app\build.gradle apply plugin: 'com.android.application' android { compileSdkVersion 20 buildToolsVersion "20.0.0" defaultConfig { applicationId "com.example.bob.helloagain6" minSdkVersion 15 targetSdkVersion 20 versionCode 1 versionName "1.0" } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'),

com.google.android.gms:play-services-measurement-base is being requested by various other libraries

心已入冬 提交于 2019-11-26 00:51:28
I updated to gradle 4.0.1 and started receiving following error The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.4,15.0.4]], but resolves to 15.0.2. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies. My project doesn't use that dependency so I searched globally for it, and it it only comes up inside build/intermediates/lint-cache/maven.google/com/google/android/gms/group-index.xml as this line <play-services-measurement-base versions="15.0.0,15.0.2"/> So I tried deleting my build folder

“Gradle Version 2.10 is required.” Error

筅森魡賤 提交于 2019-11-25 20:33:31
As I've been using classpath 'com.android.tools.build:gradle:+' In the build.gradle file, I got the following error since gradle version 2.10 has been released. The error is : Warning:Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper, try editing the distributionUrl in C:\Users\blahblah\myproject\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip at first it looks easy to solve by the guide, but when I'd done the change, I got the error again. I'm using Android Studio 2.0 with the latest Android SDK Tools 24.4.1 and Android SDK Build Tools 23.0.2

Bad class file magic or version

╄→尐↘猪︶ㄣ 提交于 2019-11-25 19:35:33
I already know that question has been already asked very often and answers, but no one of the answers i found fixed my problem. It's the error: Error:Gradle: Execution failed for task ':ffcommunity:preDexDebug'. com.android.ide.common.internal.LoggedErrorException: Failed to run command: D:\Android SDK\sdk\build-tools\20.0.0\dx.bat --dex --output D:\Users\ReVo\Documents\IntelliJ IDEA\FFCommunity\ffcommunity\build\intermediates\pre-dexed\debug\bananaquery-2ee85432877a057e7414910b8127805535139d5d.jar D:\Users\ReVo\Documents\IntelliJ IDEA\FFCommunity\ffcommunity\libs\bananaquery.jar Error Code: 1