build.gradle

How to update imported modules with code modification from the their external library project in Gradle/Android Studio

点点圈 提交于 2019-12-05 04:16:19
I'm developing an android app, in which I recently migrated from Eclipse to Android Studio and Gradle. In my projected I created 5 UI Libs, and added them as modules in my project, libs I have created are pushed on my github account (publicly). In eclipse when you add external dependency for a project marked as lib, when you update the external project's code then you clean your build, your project get these updates, but in Gradle I noticed that it creates Physical Copies, completely independent from their sources, my question is how can I change only external libs and have my project updated.

No cached version of com.android.tools.build:gradle:1.2.3 available for offline mode

一个人想着一个人 提交于 2019-12-05 03:22:14
I installed JetBrains IDEA 15.0.2 with android support on my computer that is disconnected from Internet. After that the project sync give an error that gradle is not existed, so I solve the problem by downloading gradle 2.2.1 and extracting it in its corresponding position But after that a new sync error occurs that say "No cached version of com.android.tools.build:gradle:1.2.3 available for offline mode" How can I solve error, at the same time keeping my conputer disconnected from Internet Try the following steps: Un-check "Offline work" in File>Settings>Gradle>Global Gradle Settings Re-sync

Gradle Could not find method “() for arguments on root project

前提是你 提交于 2019-12-05 02:41:58
I have a Gradle project that I'm attempting to fix and am slowly learning Gradle's syntax as I go. Currently I have a library that if IS_RELEASE (an environmental variable) is set, then it uploads it to our production servers. If not, it copies it to our testing location. The code is as follows: task(detect) << { if(System.getenv().containsKey("IS_RELEASE")) apply from: “{$rootDir}/upload-pack.gradle” else apply from: “{$rootDir}/copy-testing.gradle” } detect.mustRunAfter build build.finalizedBy detect The code looks just fine and doesn't cause any syntax errors in NetBeans. However, when I

Gradle plugin for custom language

本小妞迷上赌 提交于 2019-12-05 02:24:16
问题 I have a custom language (let's say it is MyLang but it can be any language) and I would like to make a plugin for it. The plugin needs to be able to recognize the sourcesets for the language given with DSL be able to compile them using an executable (the compiler) I was able to create a plugin with a compile task (empty yet) and annotate a function with @LanguageType setting the language name to "mylang". How can I modify the plugin to be possible to add sourcesets from build.gradle files

How can i fix this error in android Adobe SDK Tool?

怎甘沉沦 提交于 2019-12-05 01:34:23
问题 I have integrated Adobe Editor in my android application it was working fine, After updating my android studio, it is crashing i added in gradle android { compileSdkVersion 26 buildToolsVersion '26.0.2' defaultConfig { multiDexEnabled true minSdkVersion 21 targetSdkVersion 26 versionName computeVersionName() testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" applicationId 'package.name' versionCode 3 manifestPlaceholders = [appPackageName: "${applicationId}"]

Android Library project can't import R class of another library project when using gradle to compile on command line

北战南征 提交于 2019-12-05 00:07:57
问题 I have this structure for my android project: ProjectDir settings.gradle MyApp(depends on LibraryA and LibraryB) -->build.gradle -->All the other android code LibraryA (depends on LibraryB) -->build.gradle -->All the other android code LibraryB (Has lots of resources that are used in LibraryA and MyApp) -->build.gradle -->All the other android code I can compile the android app just fine using both eclipse and Android Studio. LibraryA imports the R file of LibraryB by doing " import com

Gradle 14.4 Fails to Build - Gradle DSL method not found 'packageName()'

让人想犯罪 __ 提交于 2019-12-04 23:51:25
I'm using productFlavors and attempting to change the packageName depending on the flavor: productFlavors { flavor1 { packageName "com.mypackagename.one" } flavor2 { packageName "com.mypackagename.two" } } This was working fine until I updated to Gradle 0.14.4, now it fails with the following message: Error:(21, 0) Gradle DSL method not found: 'packageName()' Possible causes: The project 'MyProject' may be using a version of Gradle that does not contain the method. <a href="open.wrapper.file">Open Gradle wrapper file</a> The build file may be missing a Gradle plugin. <a href="apply.gradle

Could not find method classpath() for arguments [com.google.gms:google-services:3.0.0]

限于喜欢 提交于 2019-12-04 23:31:47
I am getting this error while adding "com.google.gms:google-services:3.0.0" this script in my build.gradle dependency. Apply this in build.gradle(Project: your project name) where tools.build:gradle is present and not in build.gradle(Module: app) buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.1.2' classpath 'com.google.gms:google-services:3.0.0' } } In build.gradle(Module: app) outside dependencies add this: apply plugin: 'com.google.gms.google-services' 来源: https://stackoverflow.com/questions/40232312/could-not-find-method-classpath-for

java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/ArrayMap;

ε祈祈猫儿з 提交于 2019-12-04 23:21:33
Today i found this error while trying to run my app. I made the following attempts towards solving it. - First i removed multidex support, but i can still see the slices of apk there. -i also attempted rebuilding the entire project, and updated the android support and play services libraries to the latest as recommended by java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/ArrayMap Android Studio - NoClassDefFoundError: Failed resolution of Landroid/support/v4/print/PrintHelper java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/os/BuildCompat

Not able to make release APK React Native Android app

戏子无情 提交于 2019-12-04 22:52:29
i want to make release for android application in react native so when i generate build i got below error message like Error:Execution failed for task ':app:bundleReleaseJsAndAssets'. A problem occurred starting process 'command 'node'' see attachment also any idea how can i solve this ? your all suggestions are appreciable After spending 2 days I resolved it, Please follow the below steps:- 1) Stop Running Gradle $ cd RectNatoveProjectName & cd android (Open your project and go to android folder) $ ./gradlew --stop (Run this command to stop old running Gradle service ) 2) Update the android