android,android-studio,gradle,build,android-gradle
You need to reduce the size or include only the imports you need to for your application. You are hitting the dex limit of 65536 methods. Here's the link Building Apps with Over 65K Methods which might help....
java,android,android-studio,android-gradle,build.gradle
Your solution is here. More specifically at the "Selectively compiling APIs into your executable" section here. By using com.google.android.gms:play-services:7.5.0, you are compiling with all Google Play services APIs. You should use the Google Play services APIs that you need. For example, if you need Google+, then you use, com.google.android.gms:play-services-plus:7.5.0 Hope...
android-studio,gradle,android-gradle
Have you had the project compile / work before? If so the issue is most likely your XML files having issues. Also try to make clean and make sure all of your dependencies are correct if you imported any. You haven't given much info besides the error code about your...
android,android-studio,android-gradle
IMPORTING ANDROID STUDIO PROJECT IN ANDROID STUDIO: If you want to import An Android Studio Project then do the following: 1. Select Open an existing Android Studio Project 2. Browse your desired project derectory. 3. Now rather than selecting the folder that contains your project, you have to select the...
android,dependencies,android-gradle
No one answered. I found.... The solution is multidex public class MyApplication extends MultiDexApplication { @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); } } in menifest file <application android:name=".MyApplication" android:allowBackup="true" android:icon="@drawable/app_icon" android:label="@string/app_name" android:largeHeap="true" android:theme="@style/Theme.MyAppTheme"> My gradle file android { compileSdkVersion 21 buildToolsVersion "22.0.1" defaultConfig {...
android,gradle,android-gradle,gradlew
I was using Gradle Daemon to speed up the builds, I suspected the exception had something to do with the Daemon so I restarted it and now it's working fine. Here's the command to stop the daemon : ./gradlew --stop The next time you do a build it starts automatically....
The way I choose to do something similar is to create a properties file and then just read that for all my global variables. You can do this with java syntax: Properties props = new Properties() props.load(new FileInputStream("/path/file.properties")) A more groovy like syntax is that's what you perfer is: Properties...
android,maven,android-studio,android-gradle,jcenter
There is a lint option called "Newer Library Versions Available". You may need to add this to your build.gradle as well: android { ... lintOptions { warning 'NewerVersionAvailable' } } Then you can run Analyze > Run Inspection By Name... > Newer Library Versions Available to get a list of...
android,android-studio,android-gradle
I already had long ago successfully used build variants to upload to Google Play Store (GPS) 'debug' apks for both free and full version of app for beta testing. That wasn't the question. The question was whether I need to knock myself out to produce 'release' apks (how to do...
Everything related to your flavors should be inside the src folder, e.g. src/main/... src/free/... src/pro/... Right now your src folder is at the same levels as the flavor folders, which is incorrect. See this documentation for confirmation of the above....
The real problem is not that the process is stuck, but that my project is so large, that one single change took more than an hour for the build to finish successfully. Now I have to investigate why my project is so big, but that's out of the scope of...
android,android-gradle,android-sdk-manager
You need to add these to your build.gradle file dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:recyclerview-v7:22.1.1' compile 'com.android.support:appcompat-v7:22.1.1' compile 'com.android.support:support-v4:22.1.1' } ...
android,sonarqube,android-gradle,lint,sonar-runner
Simply add a new line to module build.gradle file, just after sonarRunner task declaration: sonarRunner { tasks.sonarRunner.dependsOn build // <- This new line sonarProperties { ...
java,android,android-studio,android-gradle,android-annotations
The problem is with multiDexEnabled true It is only supported on Android 5 natively. So I need a library for this to run in older versions. I found the fix....
java,android,gradle,android-gradle,noclassdeffounderror
I found the problem, I am using MultidexSupport because I have a lot of libraries. Multidexsupport in grade file is only supported in andorid api21(lollipop). Found this tutorial that helped me get api 19 support: http://frogermcs.github.io/MultiDex-solution-for-64k-limit-in-Dalvik/...
android,android-gradle,release,build.gradle
Turns out I had omitted the getDefaultProguardFile('proguard-android.txt') line on the proguard files and was just using proguard-rules.pro
android,android-gradle,travis-ci
You need to update the build tools to the version 22.X, I have tried in my project configuration and that works. android: components: - android-22 - build-tools-22.0.1 ...
I finally found a workaround. Here is what I did : android { ... buildTypes { prod.initWith(buildTypes.release) prod { } uat.initWith(buildTypes.debug) uat { } } productFlavors { demo { applicationId "com.demo" } demo1 { applicationId "com.demo1" } } } task editApplicationId { android.applicationVariants.all { variant -> variant.mergedFlavor.applicationId = variant.mergedFlavor.applicationId +...
android,gradle,android-gradle,build.gradle
Alrighty the solution was to update gradle on build.gradle of my project, not module // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.2.3' } } allprojects { repositories { jcenter() } } it was set...
android,android-gradle,navigation-drawer,androiddesignsupport
Update your Android Support Library and Android Support Repository.
gradle,android-gradle,bintray,jcenter
The files aren't named correctly. You have transition-0.8.0.aar, so the artifactId can't be core. If you want everything to be core, you need to rename the project, changing the pom is not enough.
android,intellij-idea,gradle,android-ndk,android-gradle
You can get the error messages thrown back by ndk-build through Android Studio "Messages" and the Gradle Console: ...
java,android,android-gradle,rx-java
Taking into account the number of dependencies you have in your build.gradle, the most possible reason for having this error is an androids 65k methods limit. There are several ways to fix the error, which are described in the official documentation. I think the easiest way is to get rid...
java,android,gradle,java-8,android-gradle
Android can support java 1.7 since API 19 (as you see in this doc there is no mention of java 1.8) and also it doesn't use JVM and using ART or Dalvik instead ,So it generates Dalvik bytecode. I think if we want to use java 1.8 as compileOptions maybe...
android,google-api,google-calendar,android-gradle,build.gradle
When you add the multidex:true don't forget to make an Application class in your project that extends from the MultiDexApplication or a lot of bad stuff will happen public class YourApplication extends MultiDexApplication { .......... } And don't forget this either (the version may change over time, if you read...
android,android-gradle,build.gradle,findbugs,gradlew
Just place this in your modules build.gradle. apply plugin: 'findbugs' task customFindbugs(type: FindBugs) { ignoreFailures = false effort = "max" reportLevel = "low" classes = files("$project.buildDir/intermediates/classes") //Use this only if you want exclude some errors excludeFilter = file("$rootProject.rootDir/config/findbugs/exclude.xml") source = fileTree('src/main/java/') classpath = files() reports { xml.enabled = false xml.withMessages...
android,android-studio,gradle,android-gradle
Just like CommonsWare suggested, make sure you have Gradle 2.2.1+ (the latest is 2.3). Make sure you upgrade your Android Studio but here are the "plugins" that need to be updated: Top build.gradle: Change: classpath 'com.android.tools.build:gradle:1.1.0-rc1' To: classpath 'com.android.tools.build:gradle:1.1.3' // latest 1.2.3 App build.gradle: Change: compile 'com.android.support:recyclerview-v7:21.0.0' compile 'com.android.support:cardview-v7:21.0.0' To:...
Solution: Wrap it in afterEvaluate { test.dependsOn 'mytask' } ...
cordova,android-studio,gradle,android-gradle,cordova-plugins
What you're looking for is an aar file. You can copy this file to lib folder with the following script: apply plugin: 'java' repositories { mavenCentral() } dependencies { compile 'io.filepicker:filepicker-android:[email protected]' } task copyLibs(type: Copy) { from configurations.compile into 'lib' } ...
This is a confirmed bug with Android Studio 1.2: https://code.google.com/p/android/issues/detail?id=160899 The main solution is to wait for their fix. I have had luck re-importing the project, but I have to do it every time I open the project....
android-studio,gradle,testng,android-gradle,build.gradle
Use TestNG 6.9.4, which is distributed on both JCenter and Maven (6.3.1 is on Maven Central only, which you don't seem to have in your repositories list).
android,twitter,android-studio,android-gradle,twitter-fabric
Replace twitter-core in this line below compile('com.twitter.sdk.android:twitter-core:[email protected]') { transitive = true; } with twitter so it would look like this compile('com.twitter.sdk.android:twitter:[email protected]') { transitive = true; } ...
android,android-studio,android-gradle,build.gradle
You can write your fields inside BuildConfig class and then get them from there. productFlavors { myApp { buildConfigField "String", "URL", "\"someurl.com\"" } } public class MyApplication extends Application { private String URL; @Override public void onCreate() { URL = BuildConfig.URL; } } ...
android,gradle,android-gradle,build.gradle
By the look of it the attributes you are using ie error: Attribute "track" has already been defined error: Attribute "thumbTextPadding" has already been defined error: Attribute "switchMinWidth" has already been defined error: Attribute "switchPadding" has already been defined might being used by the M-Preview SDK.Just change your attributes of...
java,android,android-studio,android-gradle,build.gradle
Welcome. You are at the first step of Android gradle hell. Update your Android SDK components in SDK Manager to latest one including Extra > Google Repository (recommend to add almost all in Extra). Let's wash up your current file. AndroidManifest.xml: Remove the <uses-sdk ... /> lines. It's redundant as...
android,android-gradle,build.gradle
Here is an example how you can easily implement it. SpecificParameter.java public class SpecificParameter { public static ParameterType getParameter() { return parameter; } } and in your buildConfigField, you can set the parameter like, parameter = SpecificParameter.getParameter(); and put 4 SpecificParameter.java to your flavor packages. This way your flavors will...
The reason this happened was because the dependency line changed, and was no longer right. I cannot figure out why it would work after one build, but not after a clean. The error message isn't clear! Even though the artifact didn't exist according to the dependency declaration, it would pass...
android,eclipse,android-studio,android-gradle,packages
My problem was that I was looking at the wrong build.gradle file and didn't see the application id value. Once I found the correct file (thanks to @ianhanniballake) I changed the application id and it worked.
java,android,eclipse,android-studio,android-gradle
I solved my problem by getting nightly builds of Libgdx, create a new project and copy the source from old project. Then import the Android libraries by Android Studio. I think it's because of new Gradle version.
android,gradle,android-gradle,proguard,android-progaurd
It took quite a while for me to figure it out but as I guessed It was all about proguard configuration. I want to answer my own question, so in the case someone else gets the same issue, this could provide a solution. I started to dig through the Warnings...
android,android-gradle,build.gradle,android-productflavors
Found a more simple solution productFlavors { GooglePlay { buildConfigField "String", "ChannelName", "\"GooglePlay\"" } Amazon { buildConfigField "String", "ChannelName", "\"Amazon \"" } } Then access the channel name via BuildConfig.ChannelName...
android,compilation,compiler-errors,android-gradle,build.gradle
Play services is a big library with tens of thousands of methods that will eat into your dex limit. Its better to replace the play services imports with just the parts you need. From version 6.5, you can instead selectively compile Google Play service APIs into your app. Google+ com.google.android.gms:play-services-plus:7.5.0...
android,android-studio,android-gradle,build.gradle
The problem is compiling. Change compile options to Java 6. compileOptions { sourceCompatibility JavaVersion.VERSION_1_6 targetCompatibility JavaVersion.VERSION_1_6 } ...
android-studio,gradle,android-gradle,build.gradle,android-productflavors
I think you misunderstood the concept of flavorDimension. A flavorDimension is something like a flavor category and every combination of a flavor from each dimension will produce a variant. In your case, you must define one flavorDimension named "type" and another dimension named "organization". It will produce, for each flavor...
android,android-studio,gradle,android-gradle,build.gradle
I want the user of the .aar file to be notified/warned about .aar dependencies so his project doesn't successfully builds till these dependencies are set inside his project. Well, to some extent, that would happen automatically, as their compile would fail. If you distribute this AAR as an artifact...
android,android-gradle,buildconfig
Based on your BuildConfig.java, these Strings need to have quotes: public static final String API_CLIENT_ID = "fd8drdsgdsgsd4"; public static final String API_CLIENT_SECRET = "5d4f9adab5zdfhfdxzxdfbdbc72a18087ce"; The original project on Github looks like this: buildConfigField "String", "API_CLIENT_ID", project.API_CLIENT_ID buildConfigField "String", "API_CLIENT_SECRET", project.API_CLIENT_SECRET The project. means that API_CLIENT_ID and API_CLIENT_SECRET are defined in...
java,android,intellij-idea,out-of-memory,android-gradle
You can add this line to application class declaration into manifest file to request a larger heap size. android:largeHeap="true" Make change into manifest file code. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.thenewjonathan.gloryblades" > <uses-permission android:name="android.permission.internet"/> <uses-permission android:name="android.permission.access_network_state"/> <uses-permission...
android,android-studio,gradle,android-gradle,build.gradle
You have to add the repository from which gradle should download the aar. repositories { jcenter() } Without this part, gradle doesn't know where to find the dependencies. The other libraries doesn't need the repo because are a local jar (in the lib folder): compile files('libs/opencsv-3.1.jar') or a local maven...
gradle,dependencies,android-gradle,build.gradle,simple-framework
I solved this problem. I add a configurations to my application project. So my application build.gradle file is below. configurations { compile.exclude module: 'stax' compile.exclude module: 'stax-api' compile.exclude module: 'xpp3' } dependencies { compile 'com.android.support:support-v4:19.+' compile 'com.google.android.gms:play-services:5.+' compile 'com.jakewharton:butterknife:5.1.2' compile 'com.jakewharton.timber:timber:3.1.0' compile 'commons-io:commons-io:2.4' compile 'commons-net:commons-net:3.3' compile...
android,android-gradle,build.gradle
try#3 android.applicationVariants.all { v -> if (v.buildType.name == "release"){ v.assemble.doLast { logger.lifecycle("we have successfully built $v.name and can post a messaage to remote server") } } } ...
android,android-studio,android-gradle
Yes download the file manually from the gradle Homepage and then it really doesn't matter where you put the file. Just unzip the file to any directory on you workstation e.g., where you have your programms - and then in android studio you go File -> Settings -> Build execution...
unit-testing,android-studio,junit,gradle,android-gradle
I assume you're using Android Studio version 1.2, the latest at this time. I don't think anything is wrong with your code. According to Jason Atwood's post, the problem seems related to gradle caching the previous results and not running it again. If you look at the "Gradle console", you'll...
android,android-studio,apk,generator,android-gradle
It actually does create APK file, but not in the root project directory. It does create it on the path project_root/module_name/build/output/apk/ Try searching for APK files in the project root directory with subdirs, and you'll find them and understand what I mean
android,linux,gradle,android-gradle,circleci
The solution after much tweaking seems to require you to explicitly specify the components you need in the --filter option. If you don't add filter, it appears that --all will NOT give you all the components needed. Fix is below for others: ssh dependencies: pre: - echo y | sudo...
android,android-imageview,android-gradle,android-library,renderscript
You have to delete the lib because it might be doubled
android,facebook,gradle,android-gradle,build.gradle
You have to include this part in the buildscript block dependencies { classpath 'com.android.tools.build:gradle:1.1.3' } Should be: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.1.3' } } ...
intellij-idea,android-studio,gradle,android-gradle
In most cases, the gradle is simply not refreshed or not configured properly. Go to your gradle task bar (Mine is situated on the right hand side of the screen) and press the refresh icon to get it back
It happens because some tasks are created during script evaluation, hence they are not available at configuration time but at runtime only. I'm not sure about syntax (and if it's possible to define dependency at this level od evaluation) but try: project.afterEvaluate { assembleAmazonDebug.dependsOn info } It will define the...
android-studio,gradle,task,android-gradle,build.gradle
Gradle build goes through 3 phases: Initialization - determine which projects are going to take part in the build, and creates a Project instance for each of these projects. Configuration - configure project objects and specifically the tasks to be executed. Execution - executing the subset of the tasks created...
maven,javamail,android-gradle,build.gradle,gmail-api
The javax.mail-api-1.5.3 can also be downloaded from existing repositories (probably jCenter or mavenCentral) described in your build file. If you aren't tied to using your downloaded version in /libs, you might do this in your build file: dependency { compile 'javax.mail:javax.mail-api:1.5.3' } The default behavior in this case is to...
The "buildscript" configuration section is for gradle itself (i.e. changes to how gradle is able to perform the build). So this section will usually include the Android Gradle plugin. The "allprojects" section is for the modules being built by Gradle. Oftentimes the repository section is the same for both, since...
android,gradle,android-gradle,build-tools
Loop the variants and check their names: productFlavors { vanilla {} chocolate {} } applicationVariants.all { variant -> println("Iterating variant: " + variant.getName()) if (variant.getName() == "chocolateDebug") { variant.buildConfigField "boolean", "VARIABLE", "true" } else { variant.buildConfigField "boolean", "VARIABLE", "false" } } ...
android,xamarin,android-gradle,build.gradle,superslim
I've just created the necessary bindings, you can check out the (pretty simple) binding project on https://github.com/dmunch/SuperSLiM-binding or download the NuGet at https://www.nuget.org/packages/SuperSLiM/
android,debugging,android-gradle
Have you tried to move the ic_launcher in mipmap-... folders? If not try to create mipmap forlders for all the resolutions and move the ic_launcher.png files into them (make sure they are removed from drawable folders. Also don't forget to change the reference in the android manifest file :-)...
android-studio,gradle,android-gradle,proguard,minify
The default value for minifyEnabled is false for all build types, as @laalto answered. However, currently (as of 2015-04-24), this is not true for multi-module projects, in which some modules (app included) are dependent on other modules. This is due to bug #52962 that causes build types to not propagate...
You could try something like that import java.util.regex.Pattern task('increaseVersionCode') << { ... // You could code in your increment system, for eg // Using build.gradle (recommended) def buildFile = file("build.gradle") def pattern = Pattern.compile("versionCode\\s+(\\d+)") def manifestText = buildFile.getText() def matcher = pattern.matcher(manifestText) matcher.find() def versionCode = Integer.parseInt(matcher.group(1)) def manifestContent =...
If you are using Android Studio, use buildConfigField to add custom fields to your BuildConfig class. buildTypes { debug { buildConfigField "String", "SERVER_URL", '"http://test.this-is-so-fake.com"' } release { buildConfigField "String", "SERVER_URL", '"http://prod.this-is-so-fake.com"' } mezzanine.initWith(buildTypes.release) mezzanine { buildConfigField "String", "SERVER_URL", '"http://stage.this-is-so-fake.com"' } } Here, I have three build types: the standard debug...
android,gradle,sdk,android-gradle
You need to create a new gradle task, similar to mine task clearJar(type: Delete) { delete '../location/' + LIBRARY_NAME + '_' + LIBRARY_VERSION + '.jar' } task makeJar(type: Copy) { dependsOn clearJar, build from 'build/intermediates/bundles/release/' into '../../location/' include 'classes.jar' rename 'classes.jar', LIBRARY_NAME + '_' + LIBRARY_VERSION + '.jar' } Where...
android-studio,android-gradle,android-standout
I followed the answer of sbr1308 but I have to do some more things.What you have to do: Go to Android Studio File->Project Structure-> + , You will get four options to add a new module. From there choose "Import Existing Project"->Next-> browse to the directory you have downloaded library...
In Windows you can use this file: C:\Users\username\.gradle\gradle.properties ...
android,android-studio,android-gradle,android-sdk-tools
android gradle plugin 1.3 is not released yet. Currently it's in beta. So, try setting the version to 1.3.0-beta1. You can see the list of all the android grade plugin versions here. Pro tip: scroll all the way down to the bottom so it's easier to see the latest version....
android,android-studio,android-gradle,proguard,retrofit
Proguard doesn't play well with many of the libraries I used in my project. For gson I added the proguard rules given by the gson team at http://google-gson.googlecode.com/svn/trunk/examples/android-proguard-example/proguard.cfg You need to change -keep class com.google.gson.examples.android.model.** { *; } to -keep class com.your.package.name.your.models.** { *; } For retrofit you need to...
This is normal behavior. Notice this sentence in the changelog (v 0.5.5): access to the variants container don't force creating the task. This means android.[application|Library|Test]Variants will be empty during the evaluation phase. To use it, use .all instead of .each ...
android,android-gradle,build.gradle
I just ran into this earlier this week. Change: classpath "com.android.tools.build:gradle:1.3.0-beta1" to: classpath "com.android.tools.build:gradle:1.3.0-beta2" to line up with the rc2 build tools....
I believe I found a solution. Builds seem faster but I don't see any log messages to indicate incremental dex is working. applicationVariants.all { variant -> if (variant.buildType.name == 'debug'){ variant.dex.enableIncremental = true variant.dex.dexOptions.incremental = true variant.dex.dexOptions.preDexLibraries = true } } ...
android,git,android-studio,android-gradle,android-sdk-tools
Clone the project again and build the project if possible
android,android-studio,mockito,android-gradle,powermock
It should be good already. At least in my case its working fine. dependencies { testCompile 'junit:junit:4.12' testCompile 'org.mockito:mockito-core:2.0.5-beta' testCompile 'com.android.support:support-v4:22.0.0' testCompile ('org.powermock:powermock-api-mockito:1.6.2') { exclude module: 'hamcrest-core' exclude module: 'objenesis' } testCompile ('org.powermock:powermock-module-junit4:1.6.2') { exclude module: 'hamcrest-core' exclude module: 'objenesis' } } Also, remember to select Unit Tests in the...
java,android,android-studio,gradle,android-gradle
After days of trying out finally could fix the issue. The problem with one of my .jar files. I had to remove each jar and check one by one until i found it. I removed the .jar file and cleaned my project and ran successfully. If any one should face...
You should consider changing your compile 'com.google.android.gms:play-services:7.5.0' dependency, and grab only a portion of the Play Services. You can see the guide for it at https://developers.google.com/android/guides/setup#split , that will most likely solve your 65k issue as well....
android,android-studio,android-gradle
Try to close project, remove folder classes on path D:\Apps\Application\app\build\intermediates\classes\, reopen project and rebuild. When I had same issue, it helped me.
android,android-studio,android-gradle
Just copy your project folder from inside .../AndroidStudioProjects and paste it in the .../AndroidStudioProjects folder in your target laptop. All the files of the project are contained there....
java,android,android-gradle,build.gradle,android-espresso
Update (6/04/2015): With the latest release of runner 0.3 and rules 0.3, this answer is no longer needed. You can simply use androidTestCompile 'com.android.support.test:runner:0.3' androidTestCompile 'com.android.support.test:rules:0.3' androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2' with latest support libraries. (22.2.0 as of this writing) Update (5/30/2015): compile 'com.android.support:appcompat-v7:22.2.0' androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2' //...
android,android-gradle,appcompat,android-support-design
As of version AppCompat 22.1.0, you should use AppCompatEditText instead of the internal TintEditText.
android,android-studio,android-gradle,zxing,android-developer-api
Make sure you have the latest build toolds and sdk from the SDK manager. I have converted those jars to Gradle dependencies. build.gradle: // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() maven { url 'http://ksoap2-android.googlecode.com/svn/m2-repo' } // <-- added...
java,android,gradle,android-gradle,build.gradle
The problem was in the gradle file, the compileSdkVersion was accidentally changed from 21 to 22, so I had to change it back, change the buildToolVersion and the target sdk version to the latest version. the comments were way off, I ended up deleting all my phones cached data as...
android,android-gradle,build.gradle,aar,bintray
It looks like transitive dependencies aren't working. Try replacing the dependencies in your build.gradle with this dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile(group: 'it.code.martin', name: 'wordutils2', version: '1.0.0', ext: 'aar’){ transitive=true} } If that doesn't work, I'd recommend downloading the correct apache commons Jar and building the library with...
java,android,android-studio,android-gradle
For Android: Command: gradlew jarDebug / gradlew jarRelease Code: android.libraryVariants.all { variant -> task("jar${variant.name}", type: Jar) { description "Bundles compiled .class files into a JAR file for $variant.name." dependsOn variant.javaCompile from variant.javaCompile.destinationDir exclude '**/R.class', '**/R$*.class', '**/R.html', '**/R.*.html' } } Source: http://stackoverflow.com/a/19967914/950427 Java or Android Project: task makeJar(type: Copy) { from('directory1/')...
String type build config fields should be declared like this: buildConfigField "String", "SERVER_URL", "\"http://dev.myserver.com\"" the field name in quotes, the field value in mirrored quotes additionally....
java,android,gradle,android-gradle,facebook-android-sdk
First of all you should try to list your dependencies with gradle :MODULE:dependencies Check if there are libraries conflicts ( same library but different version ). In this case i supose you should exclude support library module from Facebook SDK. compile ('com.facebook.android:facebook-android-sdk:3.23.1'){ exclude group: 'com.google.android', module: 'support-v4' } ...
android,android-gradle,dagger-2,multidex,android-multidex
The new support v4 library has multidex included, have you tried using that? add the following to your gradle dependencies: compile "com.android.support:support-v4:$21.0.+" and add this flag to your android > defaultConfig in gradle android{ defaultConfig{ .... multiDexEnabled true } } ...
android-studio,android-gradle,libpng,aapt
Somehow your system is promoting the warnings to errors. Applications can force the sRGB-checking to be skipped by putting the following line in your application and recompiling it png_set_option(png_ptr, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON); as explained in the libpng manual. This checking was added at libpng version 1.6.0 and the option to skip...
android,android-studio,gradle,android-gradle,shareactionprovider
This compiled for me: import android.support.v7.internal.widget.ActivityChooserModel; import android.support.v7.widget.ShareActionProvider; public class MainActivity extends AppCompatActivity{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ActivityChooserModel dataModel = ActivityChooserModel.get(this, ShareActionProvider.DEFAULT_SHARE_HISTORY_FILE_NAME); } build.gradle: dependencies { compile fileTree(dir: 'libs', include: ['*.jar'])...
the release{} is being disregarded Not really. Every line of code in build.gradle is executed when the script is processed. Gradle scripts are not there to execute code at build time. They are there to define the object model of the build process. In Android Studio, Gradle scripts are...
android,android-studio,android-gradle,kotlin
This is fixed in Kotlin 0.12.356. You may see the discussion in the corresponding issue: KT-7862.