Status Update
Comments
da...@google.com <da...@google.com> #2
Hi, was this a regression after you upgrade your NDK or upgrade your Android Studio?
yb...@google.com <yb...@google.com> #3
Neither of them. There were no change to AS (4.1-RC1) nor NDK versions.
I just changed my old scripts in build.gradle to the android recommended method i.e.
externalNativeBuild { ndkBuild { path file('jni/Android.mk') } }
If I reverted the change to my old script, everything is working again. The old scripts uses
ndk.dir=/opt/android/android-sdk/ndk-bundle
as defined in local.properties file
The source.properties files indicate the version as:
Pkg.Desc = Android NDK Pkg.Revision = 21.3.6528147
da...@google.com <da...@google.com>
da...@google.com <da...@google.com> #4
Hi, the problem is that when Android Gradle Plugin executes ndk-build, it is missing the '-C' + projectDir + '/jni'
part in your custom task. Therefore, the current working directory is the module root (parent of the jni
directory). Hence the error.
The fix is to add the following to your build.gradle
android {
...
defaultConfig {
...
externalNativeBuild {
ndkBuild {
arguments "-Cjni"
}
}
}
}
Please reopen the bug if you have further issues. Thanks!
Description
As a developer, if I believe that I have removed all references to a given code file or resource, I can typically select to Safe Delete the file from the context menu to ensure that there truly aren't any hidden or lingering references before the file is deleted. This assists with cleanup without the need to constantly do a full build/test pass.
However, when View Binding is used, you basically can't use this functionality safely anymore. Selecting Safe Delete on any layout will often result in the layout being deleted without any issues, indicating there were no lingering references. However, re-compiling will result in build errors.
This problem is extra bad for for a few reasons: