build.gradle

Gradle not picking up latest library/version from artifactory

自作多情 提交于 2019-12-12 01:39:30
问题 I have project A and B. Project B depends on A. If I build a snapshot for B, it will trigger a snapshot build on A. The issue is that when the latest snapshot of A gets pushed, B doesn't pick up the latest snapshot. Rather, it picks up the one before that. Is there any reason why? And can I pull the latest snapshot every time ? 回答1: If your dependencies do not have the "-SNAPSHOT", you can specifically tell gradle that the dependency is a changing one like this: dependencies { compile group:

Javafx with Android - Api

元气小坏坏 提交于 2019-12-12 01:19:36
问题 I'm trying to use Android specific code in a JavaFx Project. I wrote a litte game on JavaFX and when I use JavaFX-Ports I can run this Game on my Android Handy. Now I want to display some ads and for this I have to use the FXActivity as a context. I imported the FXActivity import javafxports.android.FXActivity; Then I get this Error: D:\Martin\Programmieren\fx to android\Trio\src\main\java\net \hagh\Main.java:18: error: package javafxports.android does not exist import javafxports.android

Problems during build when referencing static lib directory gradle

怎甘沉沦 提交于 2019-12-12 00:09:40
问题 I use a build.gradle file which needs to reference some jar files which are neither available on a public nor an internal repository. Because of that I put the jar files into a lib directory which is below my Eclipse project: dependencies { ... compile files('lib/*.jar') } This works fine as long as I run or export my program from within Eclipse. But when I try gradle build gradle fails with this error: Could not normalize path for file 'C:\Workspaces\MyProject\project\lib\*.jar'. I changed

Set project dependencies with Gradle

风流意气都作罢 提交于 2019-12-11 23:47:22
问题 I am using Gradle for Android with Eclipse (NOT Android Studio and please do not suggest to change the IDE). My project.properties file got this line: android.library.reference.1=..\\google-play-services_lib I tried adding this line to build.gradle: compile project('..\\google-play-services_lib') When building the project I get this error: Project with path '..\google-play-services_lib' could not be found in root project 'myProject'. What am I doing wrong? How do I define in the build.gradle

Android Cannot change dependencies of configuration ':compile' after it has been included in dependency resolution

那年仲夏 提交于 2019-12-11 20:41:07
问题 I could not able to build my library module on Android studio. I got the following exception in build.gradle file: Cannot change dependencies of configuration ':smack-android:compile' after it has been included in dependency resolution. * Where: Build file '/Users/...../build.gradle' line: 15 I am using Android studio 3.2.1 and Gradle version is 4.6 build.gradle: dependencies { // androidProjects lists all projects that are checked to compile against android.jar // Filter out the optional

With Android Studio 3.X.X, adding local .AAR file to Gradle build is not working [duplicate]

前提是你 提交于 2019-12-11 18:45:43
问题 This question already has an answer here : Transitive dependencies for local aar library (1 answer) Closed 10 months ago . With Android Studio 3.X.X, adding local .AAR file to Android project is not working (Build is success but getting runtime exceptions) I tried below methods (Taken reference From: https://stackoverflow.com/a/23326397/5685911, https://stackoverflow.com/a/24894387/5685911, etc.), but none worked for me: 1. Import the local aar file: (I) File>New>New Module>Import the .AAR

android studio failed to resolve: runner and failed to resolve: espresso-core and failed to resolve: monitor

北城以北 提交于 2019-12-11 18:44:12
问题 I installed android studio 3.1.3 and when I tried to build a new application .. During the gradle synchronization I had a problem as in the following picture: Failed to resolve: espresso-core Open File Failed to resolve: runner Open File Failed to resolve: monitor Open File and that is my app(build.gradle): apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.example.tareq.ds" minSdkVersion 28 targetSdkVersion 28 versionCode 1 versionName

Get value from `build.gradle` to code

末鹿安然 提交于 2019-12-11 18:19:11
问题 We have a build.gradle where the version is defined in it. I need to implement a version endpoint ( like /version ) to get the version of the project. This version property in build.gradle has been there for a long time, I can't move it to the project.properties file. How can I access this version 's values from my Java code? 回答1: There are many ways with which you can "plant" information into your code First you can use the manifest file, and read from it jar { manifest { attributes( "lib

Suppressed: java.lang.ClassNotFoundException: com.google.firebase.provider.FirebaseInitProvider

徘徊边缘 提交于 2019-12-11 17:51:39
问题 My app works perfectly when you run it on API 23 - 27, but on API 21 & 22 it crashes with the following error:i tried lot still issuse is not resloved This is the link having same issuse but it's not help me Didn't find class "com.google.firebase.provider.FirebaseInitProvider"? Error java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on

Gradle is taking a long time to build

雨燕双飞 提交于 2019-12-11 17:40:16
问题 All of a sudden my gradle build has become really really slow seams like its doing some extra work that it didn't used to do here is a picture from build : as you can see there are a lot of tasks here it used to be build in like 10 seconds now it takes minutes to build whats wrong with it? it writes things in the bottom bar like resolving some libraries for kotlin and doing something related to caching "variant attribute matching cache" here is the picture : i was trying to activate the