Skip to content

Help Android Studio select the correct resource directory again

Daniel Tang requested to merge danielt/kdeconnect-android:vector-res-dir into master

Summary

My !224 (merged) works and the app runs fine. Unfortunately, it made development harder because Android studio is now trying to place icons from "New > Vector Asset" into /build/dependency-license-res instead of the proper /res/. This has affected developers like @xyz, who I seem to have impacted since this problem surfaced in !229.

Changing the order of the directories defined in build.gradle seems to fix this problem. This is what this MR does in hopes of fixing "New > Vector Asset" and making it convenient for developers again.

Another cause of the problem is that I created the new directory /build/dependency-license-res instead of using /build/generated/res (which Android Studio seems to detect as generated). However, I won't use /build/generated/res because I ran into problems with the order that Gradle tasks create and delete folders, and I didn't want to debug that.

Test Plan

The compilation output should be identical. The last step of the "New > Vector Asset" should now detect the correct folder:

Before:

Screenshot_20210123_032631

After:

Screenshot_20210123_032538

Edited by Daniel Tang

Merge request reports