2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
b89a4f3550 Fix ComponentName property access in cloneAnr method
Changed from accessing non-existent className/packageName properties
to using flattenToShortString() method which returns the component
name in a standard format. This fixes the Kotlin compilation errors:
- Unresolved reference 'className'
- Unresolved reference 'packageName'

Co-authored-by: fankes <37344460+fankes@users.noreply.github.com>
2026-01-16 03:43:39 +00:00
copilot-swe-agent[bot]
c4108069a9 Fix build failure: add explicit String type to suffix parameter
The build was failing because the Gradle Kotlin DSL couldn't infer
the type of the 'suffix' parameter in the lambda, causing
'isNotBlank()' method to be unresolved.

Fixed by explicitly typing the lambda parameter as String:
`{ suffix: String -> ... }` instead of `{ suffix -> ... }`

Co-authored-by: fankes <37344460+fankes@users.noreply.github.com>
2026-01-16 03:33:32 +00:00
2 changed files with 3 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ androidComponents {
// Workaround for GitHub Actions. // Workaround for GitHub Actions.
// Strongly transfer type to [String]. // Strongly transfer type to [String].
@Suppress("UNNECESSARY_SAFE_CALL") @Suppress("UNNECESSARY_SAFE_CALL")
val currentSuffix = gropify.github.ci.commit.id?.let { suffix -> val currentSuffix = gropify.github.ci.commit.id?.let { suffix: String ->
if (suffix.isNotBlank()) "-$suffix" else "" if (suffix.isNotBlank()) "-$suffix" else ""
} }
val currentVersion = "${output.versionName.get()}$currentSuffix(${output.versionCode.get()})" val currentVersion = "${output.versionName.get()}$currentSuffix(${output.versionCode.get()})"

View File

@@ -161,8 +161,8 @@ data class AppErrorsInfoBean(
isAnr = true, isAnr = true,
exceptionClassName = "ANR", exceptionClassName = "ANR",
exceptionMessage = anrInfo?.cause ?: "Application Not Responding", exceptionMessage = anrInfo?.cause ?: "Application Not Responding",
throwFileName = anrInfo?.activity?.className ?: "unknown", throwFileName = anrInfo?.activity?.flattenToShortString() ?: "unknown",
throwClassName = anrInfo?.activity?.packageName ?: packageName ?: "unknown", throwClassName = packageName ?: "unknown",
throwMethodName = "unknown", throwMethodName = "unknown",
throwLineNumber = -1, throwLineNumber = -1,
stackTrace = anrInfo?.info?.trim() ?: "unknown", stackTrace = anrInfo?.info?.trim() ?: "unknown",