gradle

flutter: getting gradle error while running my flutter app for the first time

谁说胖子不能爱 提交于 2021-01-29 13:30:55
问题 this is my first flutter app. Each time I just get error while running it. I first thought it was a problem of connection even though my connection is good, I am still getting this nasty error Launching lib/main.dart on TECNO L8 Lite in debug mode... Initializing gradle... [{"event":"app.progress","params":{"appId":"e76fdc75-00d2-4f4c-bf6c-b272d9d82041","id":"1","progressId":null,"message":"Resolving dependencies..."}}]Resolving dependencies... Error running Gradle: ProcessException: Process

Note: Recompile with -Xlint:deprecation for details.(Solved)

一个人想着一个人 提交于 2021-01-29 12:35:26
问题 Note: --:-----.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 回答1: To solve this problem you need to go Gradle Scripts the click on build.gradle after buildscript you need to add gradle.projectsEvaluated { tasks.withType(JavaCompile){ options.compilerArgs << "-Xlint:deprecation" } } For example : buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.6.3' classpath 'com.google.gms:google

Gradle: how to check duplicate class in project?

妖精的绣舞 提交于 2021-01-29 11:23:45
问题 My application can not run normal when it has duplicate class, with problem like 'no such method'. The project have two class with the same class name , one is from project code, another is from a jar file. how to check this problem when build the gradle project? src/main/java/com/kxw/Example.java gradle.build compile("com.kxw:xxx:1.0")//contain com.kxw.Example I expect there has a gradle plugin can check duplicate class in project, like 'maven enforcer plugin' from maven project. 来源: https:/

Gradle Sync failed: Could not find method implementation()

我怕爱的太早我们不能终老 提交于 2021-01-29 11:00:16
问题 Been trying to resolve this error for hours...cant get it solved. I am a newbie to Android Studio My project level build.gradle file is as follows // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() maven { url "https://maven.google.com" } } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.google.gms:google-services:4.0.1' } } allprojects { repositories { jcenter() maven { url

gradle: how to access the gradle.properties from another project

我的梦境 提交于 2021-01-29 10:32:12
问题 How can I access a gradle.properties from another project? project1/gradle.properties project2 Project2 uses the same gradle.properties as Project1. The gradle.properties is in source control, so it is not good idea to put it in user home directory. The gradle.properties of Project1 contains some credentials I would like to reuse in Project2. Is there a way to tell Gradle the location of gradle.properties ? 回答1: I don't think its a very good idea to put username & password into a version

Cannot specify -processorpath or --processor-path via `CompileOptions.compilerArgs`

橙三吉。 提交于 2021-01-29 10:01:35
问题 I am trying to link my app with firebase messaging services it compiled with this warning: INFO: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'. It will be removed at the end of 2019. For more information, see https://d.android.com/r/tools/task-configuration-avoidance. To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information. Affected Modules: app When I

IntelliJ IDEA (2020.2): Gradle: The cache entry for initialization script 'ijinit.gradle' appears to be corrupted

淺唱寂寞╮ 提交于 2021-01-29 08:30:47
问题 I am working with Intellij Idea (CE) 2020.2.3 And using Gradle 6.7 I have the following situation: IntelliJ IDEA (2020.2): Gradle: The cache entry for initialization script (appears to be corrupted) Part of the solution is disable the Android plugin (I don't work with Android - so is fine for me). But until now each time I start the IDE - it automatically builds the spring-framework project based on Gradle - therefore it starts the daemon and tries to build. But I receive the following error

Build failed with an exception error in Kotlin

本秂侑毒 提交于 2021-01-29 08:16:35
问题 Got this error after updating my Kotlin plugin on android studio. package com.example.test fun main(args: Array<String>) { println("Hello world") } This is the error I receive: * Where: Initialization script '/private/var/folders/bn/st769wd16nv1d5_wccw8_tm00000gn/T/Test_main__2.gradle' line: 27 * What went wrong: A problem occurred configuring project ': app'. > Could not create task ':app:Test.main()'. > SourceSet with name 'main' not found. When I run a stack trace, this is the response I

How to add POI Android in Android Studio?

点点圈 提交于 2021-01-29 08:12:11
问题 I'd like to add POI Android in to Android Studio. The gradle code is this: implementation "com.github.SUPERCILEX.poi-android:poi:$poiVersion" But i only get this message: Could not get unknown property 'poiVersion' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. Could you help me? 回答1: Open your project-level build.gradle file. Add below code snippet: allprojects { repositories { // ... maven { url 'https://jitpack.io' } } } Then, inside

How to just compile only changed (or related) module in multi-module gradle project

半城伤御伤魂 提交于 2021-01-29 08:11:10
问题 I am having multi-module gradle project, which is having 5 modules. And these modules creates a lineage of dependency ie. A <- B <- C <- D <- E . Here A depends on B , B depends on C and so on. My problem is that, If i am going to change in A , it compile all the parent modules. Is there any way to just compile only A . And if i change in B then only compile A and B . 回答1: Yes, @JB Nizet you are correct i was using one of the scalaCompileOption property. tasks.withType(ScalaCompile) {