Status Update
Comments
ks...@google.com <ks...@google.com>
la...@google.com <la...@google.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
be...@gmail.com <be...@gmail.com> #3
The initial report (
However,
be...@gmail.com <be...@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?
gf...@google.com <gf...@google.com> #8
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Ladybug Feature Drop | 2024.2.2 Canary 2
- Android Gradle Plugin 8.8.0-alpha02
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
be...@gmail.com <be...@gmail.com> #9
The fixes for this issue are now also available in:
- Android Studio Ladybug | 2024.2.1 RC 1
- Android Gradle Plugin 8.7.0-rc01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
be...@gmail.com <be...@gmail.com> #10
jo...@google.com <jo...@google.com> #11
xa...@google.com <xa...@google.com> #14
je...@gmail.com <je...@gmail.com> #15
Specifically,
It took me hours of frustration to find this helpful comment. I'm going to open a new bug on Android Studio 3.5.0 accordingly.
Je...@envrmnt.com <Je...@envrmnt.com> #16
em...@google.com <em...@google.com> #17
Thanks for reporting this issue. I am able to reproduce the issue easily.
solodkyy@ Queries for dependent modules returns incorrect results in Chipmunk. Specifically, using the sample project in app
depends on returns empty list, while it should have returned [mylibrary]
.
This causes the following (both P0) problems:
- "Auto" debugger decides to launch Java-only instead of Java+Native
- Native debugger cannot find the debugging symbols of
mylibrary
.
// Note: The links above are Google-internal.
so...@google.com <so...@google.com>
sm...@google.com <sm...@google.com>
em...@google.com <em...@google.com> #18
This issue (about missing debug symbols for library modules) has been fixed and the fix will be included in Chipmunk Patch 2.
ve...@google.com <ve...@google.com> #19
Scenario-1:
1. Release Version abi's are displaying in debug apk too.
Scenario-2:
1. While trying to debug the sample project with breakpoints in both library and app modules , App is crashed with java.lang.UnsatisfiedLinkError
stack trace:
2022-07-27 14:28:20.537 7370-7370/com.example.hellojni E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.hellojni, PID: 7370
java.lang.UnsatisfiedLinkError: dlopen failed: library "libhello-jni.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1077)
at java.lang.Runtime.loadLibrary0(Runtime.java:998)
at java.lang.System.loadLibrary(System.java:1656)
at com.example.hellojni.HelloJni.<clinit>(HelloJni.java:59)
at java.lang.Class.newInstance(Native Method)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
at android.app.Instrumentation.newActivity(Instrumentation.java:1285)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3578)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3842)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2252)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7842)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
em...@google.com <em...@google.com> #20
If the issue reproduces in Chipmunk Patch 2, we need more detailed instructions on how to reproduce it. This bug diverged from its original title, so I suggest filing a separate bug, and include full instructions on how to create a project that reproduces it, or even better, attach a project that reproduces the issue (or issues).
Based on my efforts to reproduce using Chipmunk Patch 2, debugging (with app=non-native, lib=native) works, and no UnsatisfiedLinkError
s are observed.
dy...@gmail.com <dy...@gmail.com> #22
dy...@gmail.com <dy...@gmail.com> #23
cl...@gmail.com <cl...@gmail.com> #24
ka...@gmail.com <ka...@gmail.com> #25
Android 13
ka...@gmail.com <ka...@gmail.com> #26
Funtouch os13
Description
Setup. 2 projects `app` project and `libModule`. This bug has 2 parts which I think are related so I'm putting both parts here.
**Part 1:** Can't debug library project, setting breakpoints do not work. And when a segfault happens ndk breaks in "unknown function` and nothing useful can be done.
A workaround solution is in the main project do this:
```
// default config
externalNativeBuild {
cmake {
abiFilters'armeabi-v7a'
arguments "-DANDROID_PLATFORM=android-${platformVersion}",
'-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=gnustl_shared'
}
}
// in android {}
externalNativeBuild {
cmake {
path "../libModule/src/main/cpp/CMakeLists.txt"
}
}
```
and I can debug just fine. So far it's fine. This has the disadvantage of compiling everything twice.
**part 2:** Library project always compiles in the release folder `.externalNativeBuild` regardless what has been specified. Interesting though if I do "Build->build APK" in android studio RC2 it builds the debug build.
Some discussion [here](
Some version specifiers
```
Android Studio 2.2 RC 2
Build #AI-145.3253452, built on September 7, 2016
JRE: 1.8.0_76-release-b03 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
classpath 'com.android.tools.build:gradle:2.2.0-rc2'
compileSdkVersion 24
buildToolsVersion "24.0.2"
cmake {
abiFilters'armeabi-v7a'
arguments "-DANDROID_PLATFORM=android-19",
'-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=gnustl_shared'
}
```
Studio Build: RC2
Version of Gradle Plugin: 2.2.0-rc2
Version of Gradle: 2.14.1
Version of Java: 8
OS: Mac
Steps to Reproduce: make a project with app & module. Module is C++ with cmake. Put breakpoint in C++ code or have C++ code purposely crash. Try debugging. You can't debug.