Build error with Android Studio 3.0 Canary 4

I am currently developing an instant application for which I have rebuilt my monolithic application into functional modules. Everything was running before Android Studio canary 3, but after updating to Android Studio Canary 4 my project could not build with the following error:

A problem was found with the configuration of task ':minimoBase:dataBindingExportBuildInfoDebugAndroidTest'.

> Directory '/Users/nayak.vishal/projectData/minimo_instant_app_project/putica-client-android-
native/minimoBase/build/intermediates/data-binding-info/androidTest/debug' 
specified for property 'xmlOutFolder' does not exist.
+4
source share
6 answers

The following procedure worked as a workaround for this problem:

Run the following build commands at the gradle command prompt

1) gradlew clean

2) gradlew: appModule: assembleDebug

  • here appModule is the name of the application module for building the installed apk
  • , apk, , .

3) gradlew: instantAppModule: assembleDebug

  • instantAppModule -
  • , apks

, Android Studio Canary 4 .

+8

, data-binding . , data-binding to app, . , , DataBinding (Gradle 2.x ).

dataBinding {
    enabled = false 
}

com.android.tools.build:gradle:3.0.0-alpha5 Android Studio 3.0 Preview Canary5

UPDATE

, data-binding , , . library kotlin 1.1.3-2. . , , .

2

com.android.tools.build:gradle:3.0.0-alpha9 kotlin 1.1.3-2 , . , . dataBiding { enabled=true}, . , <layout>,

 <?xml version="1.0" encoding="utf-8"?>
<layout>
    <View xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"/>
</layout>
+5

gradle.properties

android.enableAapt2=false

AS3.0 AAPT2. AAPT2 gradle.propertΡ–es 4 AS3.

+3

, "" - ( )

XML (, base/src/res/layout/dummy.xml) , .

( com.android.tools.build:gradle:3.0.0-alpha6)

+3

:

Canary . . Android Studio (File..Edit..View..line), , "Canary X".- > X, 3,4,5 ..

, , (X) 5. build.gradle(applicationName) 3.0.0-alpha5 (/Try) :

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0-alpha5'
}

, (X): -

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0-alphaX'
}
+1

I had the same problem, it seems like a bug in Canary 4.

As a workaround, I switched to Android Studio 3.0.0 Canary 3 ( This is an archive of all releases of Android Studio ), and also downgraded the Android Gradle plugin to 3.0.0-alpha3:

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0-alpha3'
    ...
}
+1
source

Source: https://habr.com/ru/post/1680093/


All Articles