Gradle build: file error not found

I encounter this error when I try to build my project using Gradle:

${path_to_project}\teacher\build\intermediates\incremental\mergeDebugAndroidTestResources\merged.dir\values-w270dp-h560dp-v13\values-w270dp-h560dp-v13.xml: error: file not found.

I am really confused because I opened the file and it looks like this is from the dependency I use: com.wdullaer:materialdatetimepicker:3.4.1

Here is the xml file:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <dimen name="mdtp_selected_calendar_layout_height">230dp</dimen>
    <dimen name="mdtp_selected_date_day_size">100dp</dimen>
    <dimen name="mdtp_selected_date_height">190dp</dimen>
    <dimen name="mdtp_selected_date_month_size">30dp</dimen>
    <dimen name="mdtp_selected_date_year_size">30dp</dimen>
</resources>

I used to encounter a similar error with the previous plugin, but the missing resource was from the appcompat-v7 library and was because I had a mismatch with the version of the appcompat-v7 library and my compileSdkVersion . All I had to do was upgrade my appcompat-v7 and compileSdkVersion to the latest versions, and everything was installed.

But this instance seems to be from a third-party library, and I am using the latest version of the library. I do not know how to do that.

+4
6

, . , , , XML. , Android , .

dependencies {
    compile 'com.wdullaer:materialdatetimepicker:3.5.0'
}

MaterialDateTimePicker/gradle.properties

VERSION_NAME=3.5.0
...
ANDROID_BUILD_TOOLS_VERSION=27.0.2

, , (preend ./ Unix)

gradlew clean assemble

, - . , , , , GitHub MaterialDateTimePicker.

+2

, .

compile 'com.wdullaer:materialdatetimepicker:3.4.1'

to

compile ('com.wdullaer:materialdatetimepicker:3.4.1') {
    exclude group: 'com.android.support'
}

!

+1

values-w270dp-h560dp

dimens.xml , :

<resources
    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"
    xmlns:android="http://schemas.android.com/apk/res/android" >

    <dimen name="mdtp_selected_calendar_layout_height">230dp</dimen>
    <dimen name="mdtp_selected_date_height">190dp</dimen>
    <dimen name="mdtp_selected_date_year_size">30dp</dimen>
    <dimen name="mdtp_selected_date_day_size">100dp</dimen>
    <dimen name="mdtp_selected_date_month_size">30dp</dimen>
</resources>

edit: , ,

dependencies {
  compile 'com.wdullaer:materialdatetimepicker:3.5.0'
}
+1

sdk

compileSdkVersion 23     buildToolsVersion '25.0.0 '

defaultConfig {
    applicationId "com.onsource"
    minSdkVersion 8
    targetSdkVersion 23

SDK, gradle, . 2.3.3 SDK

+1

build.gradle .

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven { url 'https://maven.google.com'  }

        google()
    }
}
0

I got these errors when the project name was very long and the location where I saved the project was added to it. Apparently, this led to the absence of some files. Moving the project to another place, so that the file names do not cross the system limit, resolved the errors for me.

0
source

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


All Articles