android-gradle

Android support multidex library implementation

送分小仙女□ 提交于 2019-11-27 01:37:54
I have hit the magic dex limit because my application uses a lot of jars (drive API, greendao, text to pdf, support.. ). My current solution was that I literally created a second apk just for google drive which I called from the main apk. But now I found out that android finally supports this with this library. My problem is just that I don't know how to implement it(preferably without gradle). I can't find any good tutorials for it. Okey I am losing my mind trying to implement this... I have found this And I added: android:name="android.support.multidex.MultiDexApplication" To my manifest

Gradle Duplicate Entry: java.util.zip.ZipException

爱⌒轻易说出口 提交于 2019-11-27 01:36:21
I integrated the Zendesk mobile sdk through its maven repository into my project and it wouldn't build anymore. It has some kind of a clash with picasso library that i am using. I get this error during the build: Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. > java.util.zip.ZipException: duplicate entry: com/squareup/picasso/Action$RequestWeakReference.class I ran ../gradlew dependencies on the app folder and this is what i found under zendesk module: \--- com.zendesk:sdk:1.0.0.1 +--- com.squareup.retrofit:retrofit:1.4.1 | \--- com.google.code.gson:gson:2.2.4 +---

How to get current buildType in Android Gradle configuration

佐手、 提交于 2019-11-27 01:33:52
I want to dynamically add a dependency in an Android Gradle project based on the current buildType. I know I can specify the buildType in the dependency : compile project(path: ':lib1', configuration: 'debug') But how can I use the current buildType to specify which variant of the library I want to import, so that a debug or release build automatically imports the debug or release variant of the library? What I want is something like this (where currentBuildType is a variable containing the name of the currently used buildType): compile project(path: ':lib1', configuration: currentBuildType)

Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml

喜你入骨 提交于 2019-11-27 01:24:57
After solving a JDK zero value error, now I'm facing this one. I did a little research, but it seems I can't get to the point. Here is the log error: FATAL EXCEPTION: main E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{.MainActivity}: android.content.res.Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020013 E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2204) E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2254) E

Android studio - Failed to complete gradle execution - error in opening zip file

不羁岁月 提交于 2019-11-27 01:02:47
I'm new to android development and android studio IDE. I've checked-out a project from bitbucket and when I try to compile it I get the following error: Failed to complete Gradle Execution Cause: error in opening zip file. My gradle-wrapper.properties is as follows: distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip I wasn't able to get too much information from this but the full log states: 2014-05-23 14:06:28,950 [ 32077] WARN - nal

Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'

谁都会走 提交于 2019-11-27 00:59:50
I received these errors when i started new project in android studio. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. Error:(1) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'. Error:Execution failed for task ':app:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Android\android-sdk

Can an AAR include transitive dependencies?

纵饮孤独 提交于 2019-11-27 00:36:21
So, right now I have a Library project, say project Foo that depends on a library like OkHttp . Now, the Foo has a maven buildstep that generates an AAR and pushes it up to a public place. So now lets say I have project B, we'll call it Bar . Bar is an Android application, and Bar depends on Foo . Well, I have that. However, when I make a call to a public static function in Foo from Bar that calls OkHttp , I get this message: java.lang.NoClassDefFoundError: com.squareup.okhttp.OkUrlFactory at com.foo.sdk.utils.OkHttpStack.<init>(OkHttpStack.java:15) So, is such a thing possible? Or will Bar

ionic 2 - Error Could not find an installed version of Gradle either in Android Studio

一曲冷凌霜 提交于 2019-11-27 00:01:23
I create ionic 2 project and add diagnostic cordova plugin like this : ionic plugin add cordova.plugins.diagnostic npm install --save @ionic-native/diagnostic and add android platform like this : ionic platform add android@latest but when build with ionic build android console give me this error : Error: Could not find an installed version of Gradle either in Android Studio, or on your system to install the gradle wrapper. Please include gradle in your path, or install Android Studio and I try to download manualy gradle.3.3-all.zip and change this distributionUrl var in platform/android

Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.1.0) and test app (23.0.1) differ

…衆ロ難τιáo~ 提交于 2019-11-27 00:01:00
When building I get the following error: Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.1.0) and test app (23.0.1) differ. These are my gradle dependencies dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:support-v4:23.1.0' compile 'com.android.support:appcompat-v7:23.1.0' compile 'com.android.support:design:23.1.0' compile 'com.android.support:cardview-v7:23.1.0' compile 'com.android.support:recyclerview-v7:23.1.0' compile 'com.squareup.retrofit:retrofit:1.9.0' compile 'com.squareup.okhttp:okhttp:2

Error: File path too long on windows, keep below 240 characters

天涯浪子 提交于 2019-11-26 23:58:51
So, I made some changes to my build.gradle(app) file and android studio gives me this error (open the image in new tab for better viewing): My build.gradle(app) file (this is not the edited file, I deleted new lines of code and still no luck/solution.): Everything was quite working well until I made some changes in the build.gradle(app) file, but then I deleted those new lines of codes and android studio is still keep giving me the error. The error relates to the compile 'com.google.android.gms:play-services:8.3.0' . I have tried deleting/renaming those png images inside the stated folder,but