build.gradle

Two dependencies use the same library but with different versions

吃可爱长大的小学妹 提交于 2020-06-25 04:08:08
问题 It seems that I have the Picasso library, 2.4.0 but twitter also uses the 2.3.2 version of the library. My question is ... does the 2.3.2 library get downloaded alongside the newer version? Or just the 2.4.0 is downloaded and is used by twitter as well ? Should I exclude the 2.3.2 one and twitter will use the 2.4.0 automatically? Is this safe? The newer version might not be compatible with the twitter library, no? I'm confused how I should proceed in this case. Which library should I exclude

Android Studio 3.4: Changing the value for a property with a final value has been deprecated. This will fail with an error in Gradle 6.0

為{幸葍}努か 提交于 2020-06-24 18:25:52
问题 I get the following warning in the Build Output console of Android Studio 3.4: Task :app:processDebugResources Changing the value for a property with a final value has been deprecated. This will fail with an error in Gradle 6.0. Here's my build.gradle(Module:app) file: apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "com.xscoder.myapp" minSdkVersion 21 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android

Is there any way to automatically setting windows path in a string in groovy?

家住魔仙堡 提交于 2020-06-17 09:17:08
问题 My project root directory is: D:/Project/Node_Project I am using a gradle plugin to install nodejs temporarily in my project root directory so that some nodejs command can run in the project while the thoject builds. The plugin is as below: plugins { id "com.github.node-gradle.node" version "2.2.4" } node { download = true version = "10.10.0" distBaseUrl = 'https://nodejs.org/dist' workDir = file("${project.buildDir}/nodejs") } So, nodejs is getting installed inside the project in the

groovy.lang.MissingPropertyException: Could not get unknown property 'manifestOutputFile'

梦想的初衷 提交于 2020-06-14 06:20:28
问题 After upgrading my app from RN 0.42 to RN 0.59.10 this issue came up, unable to build my project. FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > groovy.lang.MissingPropertyException: Could not get unknown property 'manifestOutputFile' for task ':app:processDebugManifest' of type com.android.build.gradle.tasks.ProcessApplicationManifest. Build.gradle apply plugin: 'com.bugsnag.android.gradle' apply plugin: "com.android.application"

React-native project Build failed: Could not find com.android.tools.lint , Could not determine the dependencies of task ':app:lintVitalRelease'

一世执手 提交于 2020-06-13 06:30:23
问题 I have some troubles trying to generate a release of my app. App runs normally in emulator with react-native run-android . when i try to run ' gradlew assembleRelease ' in android directory of my app, i get these : D:\REACTNATIVE\finalprj\android>gradlew assembleRelease FAILURE: Build failed with an exception. What went wrong : Could not determine the dependencies of task ':app:lintVitalRelease'. Could not resolve all task dependencies for configuration ':app:lintClassPath'. Could not find

React-native project Build failed: Could not find com.android.tools.lint , Could not determine the dependencies of task ':app:lintVitalRelease'

我的未来我决定 提交于 2020-06-13 06:29:08
问题 I have some troubles trying to generate a release of my app. App runs normally in emulator with react-native run-android . when i try to run ' gradlew assembleRelease ' in android directory of my app, i get these : D:\REACTNATIVE\finalprj\android>gradlew assembleRelease FAILURE: Build failed with an exception. What went wrong : Could not determine the dependencies of task ':app:lintVitalRelease'. Could not resolve all task dependencies for configuration ':app:lintClassPath'. Could not find

R.txt': The data is invalid. (13)

二次信任 提交于 2020-05-30 11:35:51
问题 I am able to gradle build successfully but while running the app getting below Error. error: failed writing to 'D:\ ...\Projects\DineNow\GitCode\DineNow\app\build\intermediates\symbols\debug\R.txt': The data i and failed the app:processDebugResources while run-app into device. Here are the details logs org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugResources'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions

R.txt': The data is invalid. (13)

我只是一个虾纸丫 提交于 2020-05-30 11:31:06
问题 I am able to gradle build successfully but while running the app getting below Error. error: failed writing to 'D:\ ...\Projects\DineNow\GitCode\DineNow\app\build\intermediates\symbols\debug\R.txt': The data i and failed the app:processDebugResources while run-app into device. Here are the details logs org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugResources'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions

Gradle custom plugin jar with dependencies

末鹿安然 提交于 2020-05-29 10:59:07
问题 I'm trying to build a jar for a custom gradle plugin to be used by other gradle projects. I'm using java to write the plugin. I'm having a problem including dependencies in my jar. If I build the jar using the below build.gradle plugins { id 'groovy' } repositories{ mavenCentral() } dependencies { compile gradleApi() compile localGroovy() compile 'com.google.guava:guava:27.0-jre' testCompile 'junit:junit:4.12' //compile 'org.apache.commons:commons-lang3:3.8.1' } group = 'com.mine' version =

How to make an equivalent of 'compileOnly' for AAR artifacts?

拥有回忆 提交于 2020-05-29 07:22:34
问题 In real world, if you're writing ui tests for android project, after press 'Run' from Android Studio, it will assemble two apps: 'your.cool.app' and 'your.cool.app.test'. Test app will have in android manifest something like: <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner" android:targetPackage="your.cool.app"/> Which actually will be mean, that if you install them both, your test app will be merged with a real one - all dependencies (third-party libs etc..) will be in