android-build

Is it possible to declare git repository as dependency in android gradle?

为君一笑 提交于 2019-11-28 03:07:38
I want to use master version of my lib from mavencentral. Is it possible to declare git repository as dependency in android gradle? sunnyday For me the best way is: https://jitpack.io Step 1. Add the JitPack repository to build.gradle at the end of repositories: repositories { // ... maven { url "https://jitpack.io" } } Step 2. Add the dependency in the form dependencies { compile 'com.github.User:Repo:Tag' } It is possible to build the latest commit on the master branch, for example : dependencies { compile 'com.github.jitpack:gradle-simple:master-SNAPSHOT' } trupin Or you can register a

Installation failed with message Invalid File

梦想与她 提交于 2019-11-28 02:50:24
Installation failed with message Invalid File: K:\project\app\build\intermediates\split-apk\with_ImageProcessor\debug\slices\slice_0.apk. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing. WARNING: Uninstalling will remove the application data! Do you want to uninstall the existing application? i am running my project in android studio 2.3 beta 3 . Click Build tab ---> Clean Project Click Build tab ---> Build APK Run. I found the solution go to settings>build,execute,deployment>instant run>Enable instant run to

Gradle, Android and the ANDROID_HOME SDK location

做~自己de王妃 提交于 2019-11-28 02:49:24
edit: (aug-2016) That question is from November 2013 (while Android Studio was still in Developer Preview mode), Currently (AS v2.2, Aug-2016) during instalation AS asks to choose the SDK folder (or install on their default) and it automatically applies to which ever project you're opening. That means any possible workaround or fix is irrelevant as the issue is not reproducible anymore. original question: we have this project with several modules that is already configured and executes correctly on another developer PC using a wrapper. I cloned the complete git submodules into my machine.

Removing AOSP apps from build

柔情痞子 提交于 2019-11-28 00:15:48
问题 First, I'm trying to build an Android platform from the Android source code without stock apps like LiveWallpapers, Calendar, Contacts, Calculator, Phone, Settings, etc. In order to do it, I'm modifying make files in /build/target/product/ , specifically the variable PRODUCT_PACKAGES which contains all apps and libs that need to be built. For example, I deleted the following lines: DeskClock \ Bluetooth \ Calculator \ Calendar \ From PRODUCT_PACKAGES := in the file generic_no_telephony.mk .

Could not delete path

前提是你 提交于 2019-11-27 23:44:32
I have been facing these "Could not delete path" problems for months. To run my application, I always have to delete all my app/build files. But it is very time-consuming . Sometimes i have to restart android studio for run my application. Tried clean project and run. Tried clean project, build project and run. tried Invalidates caches / restart also but my app didn't run until i clear that project build folder. These are the errors I am getting alternatively. Can I reinstall Android Studio to solve this or is there a solution to get rid of it? You cannot delete a file or folder because it is

BuildConfig not getting created correctly (Gradle Android)

拟墨画扇 提交于 2019-11-27 21:29:40
问题 I am trying to convert our Android application to a gradle build. I have the project and it's libraries building successfully. I am now trying to create separate apks for our various environments (dev/test/prod have different urls for the restful services they consume). In searching around, the best way that I feel to do this is with making different BuildConfig for each environment. This is what I tried: import java.util.regex.Pattern buildscript { repositories { mavenCentral() }

Disable Android resource / image / PNG optimization

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 20:43:11
问题 How do I prevent the Android "build process" from optimizing .png images? I have an Android project with the following res directories: - /res/ - /res/drawable - /res/drawable-hdpi - /res/drawable-hdpi-v5 - /res/drawable-ldpi - /res/drawable-ldpi-v5 - /res/drawable-mdpi - /res/drawable-mdpi-v5 These directories contain many .png files . I optimize PNG sizes with PNGOUTWin, and the overall size is reduced by more than 20%. When I build the .apk file, the images are "optimized" by the build

Android MultiDex - Questions on Inner Workings

帅比萌擦擦* 提交于 2019-11-27 18:05:22
问题 I recently discovered the new MultiDex functionality from Android for working with apps having more than 65,000 references. See: https://developer.android.com/tools/building/multidex.html Can someone help me understand the following questions: 1) How does the Gradle build plugin determine what to put in the primary dex file (classes.dex) vs the secondary dex files? Based on the doc there are certain things required to be in primary dex but it doesn't give any examples. Are all activities

duplicate entry: com/android/volley/AuthFailureError.class while compiling project in android studio

大憨熊 提交于 2019-11-27 15:30:18
I am using external libraries payu money sdk and linkedin-sdk, both uses volley libraries, which while compiling project gives duplicate entry of AuthFailureError.class Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. java.util.zip.ZipException: duplicate entry: com/android/volley/AuthFailureError.class" i have also added following code to exclude module, but still same error configurations{ all*.exclude module: 'com.android.volley' } please help hsm59 I stumbled upon this same error, and after reading this , I was able to solve it. Try adding this line inside your app

Where does local.properties go for android project?

爱⌒轻易说出口 提交于 2019-11-27 13:54:49
Getting this complaint from IntelliJ 13: 8:15:48 PM Gradle '<project>' project refresh failed: SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable. Build file '/<project>/build.gradle' line: 20 : Gradle settings I have tried to spam my local.properties in every directory I can think of but still getting this error. What gives? The local.properties file goes in the project's root level, in the same folder as the gradlew , gradlew.bat , settings.gradle and other files. This file should not be included in source control.