android-gradle

Android Studio: Re-download dependencies and sync project

天涯浪子 提交于 2019-11-27 09:13:26
I downloaded an open source game " ChaseWhisplyProject " source code from Github. I imported the project in my Android Studio (Version 1.5.1). It shows following error message: Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network) Re-download dependencies and sync project (requires network) I changed all the dependency versions to latest one bu still it is showing the same message. It has two modules under the main project 1) BaseGameUtils & 2)ChaseWhisply.

compileReleaseKotlin fails with java.lang.ClassNotFoundException: com.sun.tools.javac.util.Context

家住魔仙堡 提交于 2019-11-27 09:04:36
I'm trying to build my Android Project (which contains a library module) via terminal using gradlew. From within Android Studio, it compiles and installs successfully but, when I try to run ./gradlew assembleDebug I get the following stacktrace: Using kotlin incremental compilation e: java.lang.ClassNotFoundException: com.sun.tools.javac.util.Context at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName

Android - transform Classes With Dex For Debug

。_饼干妹妹 提交于 2019-11-27 09:01:31
My project was working fine until I added the Facebook dependency. I've started getting this error. I've read many question, the problem seems to be related to MultiDex . But none of the solutions worked for me Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished with non-zero exit value 1 Even after I remove what I've added, it still show and also gradle seems

Unable to get dependencies from jcenter with a new project [closed]

倖福魔咒の 提交于 2019-11-27 08:36:44
I'm unable to get kotlin pom from jcenter with a new project. All I have done is gone File->New Project and created a new project with no activity. I'm getting the following error when it tries to build: ERROR: Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.21/kotlin-stdlib-jdk8-1.3.21.pom'. Received status code 502 from server: Bad Gateway Enable Gradle 'offline mode' and sync project My build.gradle // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() jcenter() }

Test Artifact selector missing/gone from Build Variants in Android Studio 2 Beta 5

两盒软妹~` 提交于 2019-11-27 08:32:54
In order to run Instrumentation Tests from within Android Studio, I typically select "Android Instrumentation Tests" as the test artifact to be built, via the Build Variants window. I recently upgraded to Android Studio 2 Beta 5, and the "Test Artifact" selector is no longer visible. Where did it go? Has some other configuration taken its place? I discovered this in the release notes for Android Studio 2.0 Preview 5 : "The experimental test artifacts feature (where both unit test and instrumentation tests are enabled simultaneously in the IDE) has been improved further and is now enabled by

Android Gradle DexException: Multiple dex files define Lorg/hamcrest/Description

廉价感情. 提交于 2019-11-27 08:00:00
com.android.dex.DexException: Multiple dex files define Lorg/hamcrest/Description occurring while trying to do a debug build/test either via Android Studio or via Gradle command-line on my application. The release build (without tests) works fine but as soon as testing is included ( hamcrest being a testing library), the build fails with the above error. I've checked my module dependencies and there's no duplicate requirements which gradle -q dependencies corroborates. Project settings.gradle include ':[library module]' include ':[main module]' Project build.gradle buildscript { repositories {

Gradle error upgrading to Android Studio 3.0 Beta 1

不打扰是莪最后的温柔 提交于 2019-11-27 07:57:40
Note: This seems to be an issue with the Android plugin. See comments for associated issues. I get the following gradle error when building the project: Gradle sync failed: Cause: java.lang.NullPointerException at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:98) at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94) at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255) at java.nio.file.Paths.get(Paths.java:84) at com.android.build.gradle.internal.scope.BuildOutput.getOutputPath(BuildOutput.java:222) at

Could not find property 'outputFile' on com.android.build.gradle.internal.api.ApplicationVariantImpl

╄→гoц情女王★ 提交于 2019-11-27 07:44:49
After updating to AS 1.0 RC 1 and plugin 0.14.4 I am having problems with the renaming part of my build.gradle: applicationVariants.all { variant -> def file = variant.outputFile variant.outputFile = new File(file.parent, file.name.replace(".apk", "-" + defaultConfig.versionName + ".apk")) } throws now: Error:(78, 0) Could not find property 'outputFile' on com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@67e7625f. and also I cannot jump to the class ApplicationVariantImpl to look how the property might have been renamed. Anyone knows workarounds for this? Oleg Khalidov

Upgraded to Android studio 3.4 - Aapt2InternalException: AAPT2: Daemon startup failed

妖精的绣舞 提交于 2019-11-27 07:40:21
I got Error in new project while build after i upgraded Android studio to 3.4 Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDebugResources'. Caused by: com.android.ide.common.workers.WorkerExecutorException: 8 exceptions were raised by workers Caused by: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #0: Daemon startup failed Caused by: com.android.builder.internal.aapt.v2.Aapt2InternalException: Failed to start AAPT2 process. Caused by: java.io

How to automatically uninstall android app from device before installing a new version

隐身守侯 提交于 2019-11-27 07:33:17
I am using Android studio with Gradle builds. I test my app on a device and let Android Studio and Gradle build the app and install it on the device. How can I tell Gradle or Android Studio to uninstall the app from the device before installing a new version? Apparently, if you in Run -> Edit Configurations... , on the left side there is a expendable list of Android configurations. Select yours, on the right side of the window are details on the configuration, at the bottom of that section is the Before launch section. Create a gradle-aware Make , given the task :app:uninstallAll or :app