Status Update
Comments
xa...@android.com <xa...@android.com>
ch...@gmail.com <ch...@gmail.com> #2
We're seeing a similar error in our code. Appears to be a combination of AGP 8.6.0 and Kotlin 2 needed to hit it.
private fun Intent.stripUnwantedFlags() {
// Explicitly remove the new task and clear task flags (Our browser activity is a single
// task activity and we never want to start a second task here).
flags = flags and Intent.FLAG_ACTIVITY_NEW_TASK.inv()
flags = flags and Intent.FLAG_ACTIVITY_CLEAR_TASK.inv()
// IntentReceiverActivity is started with the "excludeFromRecents" flag (set in manifest). We
// do not want to propagate this flag from the intent receiver activity to the browser.
flags = flags and Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS.inv()
}
All 3 lines then hit:
Must be one or more of: Intent.FLAG_GRANT_READ_URI_PERMISSION, Intent.FLAG_GRANT_WRITE_URI_PERMISSION, Intent.FLAG_FROM_BACKGROUND, Intent.FLAG_DEBUG_LOG_RESOLUTION, Intent.FLAG_EXCLUDE_STOPPED_PACKAGES, Intent.FLAG_INCLUDE_STOPPED_PACKAGES, Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION, Intent.FLAG_GRANT_PREFIX_URI_PERMISSION, Intent.FLAG_ACTIVITY_MATCH_EXTERNAL, Intent.FLAG_ACTIVITY_NO_HISTORY, Intent.FLAG_ACTIVITY_SINGLE_TOP, Intent.FLAG_ACTIVITY_NEW_TASK, Intent.FLAG_ACTIVITY_MULTIPLE_TASK, Intent.FLAG_ACTIVITY_CLEAR_TOP, Intent.FLAG_ACTIVITY_FORWARD_RESULT, Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP, Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS, Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT, Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED, Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY, Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, Intent.FLAG_ACTIVITY_NEW_DOCUMENT, Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET, Intent.FLAG_ACTIVITY_NO_USER_ACTION, Intent.FLAG_ACTIVITY_REORDER_TO_FRONT, Intent.FLAG_ACTIVITY_NO_ANIMATION, Intent.FLAG_ACTIVITY_CLEAR_TASK, Intent.FLAG_ACTIVITY_TASK_ON_HOME, Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS, Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT, Intent.FLAG_ACTIVITY_REQUIRE_NON_BROWSER, Intent.FLAG_ACTIVITY_REQUIRE_DEFAULT, Intent.FLAG_RECEIVER_REGISTERED_ONLY, Intent.FLAG_RECEIVER_REPLACE_PENDING, Intent.FLAG_RECEIVER_FOREGROUND, Intent.FLAG_RECEIVER_NO_ABORT, Intent.FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS
dm...@gmail.com <dm...@gmail.com> #3
The initial report (
However,
pa...@gmail.com <pa...@gmail.com> #4
Thanks for fixing! What release should we be able to verify the fix in? And is there any chance of a backport for 8.6.1?
Description
OS version: Windows 8.1
Java JRE/JDK version: 1.7.0_51 64bits
gradle version: 1.11
android-plugin version: 0.9.0
NDK version: r9d 64bits
When building ndkJniLib sample from the gradle-samples-0.9 on windows I get this error:
make.exe: *** No rule to make target `C:\Users\xhallade\Desktop\ndkJniLib\lib\build\ndk\release\obj/local/armeabi-v7a/objs/hellojni/C_\Users\xhallade\Desktop\ndkJniLib\lib\src\main\jni', needed by `C:\Users\xhallade\Desktop\ndkJniLib\lib\build\ndk\release\obj/local/armeabi-v7a/objs/hellojni/C_\Users\xhallade\Desktop\ndkJniLib\lib\src\main\jni\hello-jni.o'.
Stop.
If I create a new empty .c file aside hello-jni.c and run gradle again, the .so files are getting generated correctly.
In fact instead of calling gradle again, I can edit myself the generated Android.mk and add the second file to fix this.
When I re-run the ndk-build command line issue by gradle everything compiles fine, so the root cause seem to come from the NDK and not from the build system.
The command issued by gradle:
C:\Android\ndk\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\xhallade\Desktop\ndkJniLib\lib\build\ndk\release\Android.mk APP_PLATFORM=android-19 NDK_OUT=C:\Users\xhallade\Desktop\ndkJniLib\lib\build\ndk\release\obj NDK_LIBS_OUT=C:\Users\xhallade\Desktop\ndkJniLib\lib\build\ndk\release\lib APP_ABI=all
The generated Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := hellojni
LOCAL_SRC_FILES := \
C:\Users\xhallade\Desktop\ndkJniLib\lib\src\main\jni\hello-jni.c \
LOCAL_C_INCLUDES += C:\Users\xhallade\Desktop\ndkJniLib\lib\src\main\jni
LOCAL_C_INCLUDES += C:\Users\xhallade\Desktop\ndkJniLib\lib\src\release\jni
include $(BUILD_SHARED_LIBRARY)
They are the same in both cases - only the reference to the other .c file is added in Android.mk when it's there.
The sample is attached.