android-studio-3.0

Gradle build error in Android Studio 3.0

有些话、适合烂在心里 提交于 2019-12-03 14:18:06
Can you please help me to resolve the Gradle build issue in Android 3.0 ? I am new with Android Studio. Here are my configurations in the AS 3.0: gradle->wrapper->gradle-wrapper.properties: distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-all.zip build.gradle dependencies (Android Plugin for Gradle): dependencies {classpath 'com.android.tools.build:gradle:3.0.0'} Stacktrace from Android Studio: D:\AppiumAutomation\MobileTest>gradlew assemble --stacktrace FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'MobileTest'.

Variant debug has no output with type INSTANT_RUN_MERGED_MANIFESTS

寵の児 提交于 2019-12-03 13:56:12
问题 What I want to do & the problem I updated my Android Studio and Android Gradle Plugin to 3.0.0 and my Gradle Wrapper to 4.2.1 and want to build & deploy my Android Gradle project on a device via IDE. Building succeeds When I try to deploy my :app module to a connected device, I receive the error: Error:A problem occurred configuring project ':integration-test'. Variant 'debug' has no output with type 'INSTANT_RUN_MERGED_MANIFESTS' Details about the project (simplified) The project consists of

DexGuard integration in Android Studio 3.0

亡梦爱人 提交于 2019-12-03 13:46:58
问题 I have upgraded my Android project to use the latest Android Studio 3.0 features. Since then, I am getting the following warning message on each Gradle sync: Warning:One of the plugins you are using supports Java 8 language features. To try the support built into the Android plugin, remove the following from your build.gradle: apply plugin: 'dexguard' To learn more, go to https://d.android.com/r/tools/java-8-support-message.html If I go to the linked URL, I can see: If Android Studio detects

How to treat memory leaks using the new AndroidProfiler

混江龙づ霸主 提交于 2019-12-03 13:13:07
I'm trying to learn how to identify and treat memory leaks in my App. I'm reading this great article , but I'm a bit confused about how to apply that in the new "Android Profiler" tool, that came with Android Studio 3.0. I'have a test application and LeakCanary is pointing that my App has memory leaks. In fact, when I run the profiler and press "dump java heap" I can see that there are 4 instances of my MyCollectionActivity and, when I click on these instances, I can see the details: But the tool that is shown in the article has options I cannot see in the "Android Profiler": I will not go

Can't run app with Instant Run on Android Studio 3.0

帅比萌擦擦* 提交于 2019-12-03 10:49:36
I've updated to Android Studio 3.0 and now I cannot run the app with Instant Run enabled . I get 'Execution failed for task' due to a java.io.FileNotFoundException because it can't find the apk under ../build/intermediates/instant-run-resources/resources-production/ Any idea how to overcome this so that I can run the project with Instant Run? I'm not sure where to find the missing apk file or how to change the path to look for it in. Have your settings as below, Otherwise try to clean and re-install (after uninstalling exsisting apk) application. I found the problem and the solution. In my

Can't rename resource (layout) files (Android Studio 3.0 Beta 3 is installed)

邮差的信 提交于 2019-12-03 09:27:19
Beta 3 doesn't allow to rename resource files such as layout files. It does show the renaming dialog, but when trying to apply changes it reads the following error message: Refactoring cannot be performed File .../myapplication/R.java is read-only Also I have Beta 2 version in a neighbor directory and renaming works perfect. Any ideas how to fix that? UPD: I reported the bug (#65079508), and now it is marked as a duplicate of 65032914 https://issuetracker.google.com/issues/65032914 So, the issue is even wider and if I understand it well the bug will be fixed in some coming version of the

Android Databinding in Sub-module

邮差的信 提交于 2019-12-03 08:40:08
I have an application module, let's say "Test". The "Test" module depends on a sub-module B. Both enable databinding. In library module B, I create a simple activity using databinding, its purpose is for reusability, for example: I can create a base Login screen and use it in many apps later. Below is sample code in Package B. package com.test.packageb open class MainActivity : AppCompatActivity() { lateinit var binding : ActivityMainBinding override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding = DataBindingUtil.setContentView(this, R.layout.activity

com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex - Android Studio 3.0 stable

懵懂的女人 提交于 2019-12-03 08:27:37
问题 I made: In "Settings"->"Android SDK"->"SDK Tools" Google Play services is checked and installed v.46 Removed folder /.gradle "Clean Project" "Rebuild Project Error is: Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. > java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex Project build.gradle buildscript { repositories { jcenter() } dependencies { classpath 'com.android

Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process guava-21.0.jar Android 3.1 Dev Channel

早过忘川 提交于 2019-12-03 05:22:03
问题 After updating my dependency versions in AndroidStudio3.1 , I started getting the following error: Information:Gradle tasks [:app:assembleDebug] Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\Blabla\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\21.0\3a3d111be1be1b745edfa7d91678a12d7ed38709\guava-21.0.jar Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing. Error:com.android.tools.r8.ApiLevelException: Default

ANDROID STUDIO 3.0 upgrade : Error:Could not resolve all files for configuration ':app:xxxxxxxDebugCompileClasspath'

泪湿孤枕 提交于 2019-12-03 05:12:38
I found this warning after upgrading the latest android studio stable version Error:Could not resolve all files for configuration ':app:xxxxxxxDebugCompileClasspath'. Failed to transform file 'commons-lang-2.4.jar' to match attributes {artifactType=android-classes} using transform JarTransform Transform output file xxxxxxx/xxxxxxx/xxxxxxx/app/commons-lang-2.4.jar does not exist. here is gradle and gradle wrapper versions : gradle : classpath 'com.android.tools.build:gradle:3.0.0' and gradle wrapper : distributionUrl=https\://services.gradle.org/distributions/g‌​radle-4.1-all.zip change