Skip to content

Android build error "Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'android.content.pm.ApplicationInfo?" with compileSdkVersion 35 #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
shuwenli-tomo opened this issue Mar 31, 2025 · 1 comment

Comments

@shuwenli-tomo
Copy link

e: file:///Users/xxx/.pub-cache/hosted/pub.dev/segment_analytics-1.1.3/android/src/main/kotlin/com/segment/analytics/AnalyticsPlugin.kt:146:59 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'android.content.pm.ApplicationInfo?'.

Reproduce:

  1. segment-analysis: 1.1.3
  2. upgrade compileSdkVersion 34 to 35
  3. build and run android

Possible reason:
In Kotlin 35, the PackageInfo.java mark ApplicationInfo with Nullable annotation.

@neelkanth-kaushik
Copy link

Thanks for reporting the issue, we are working on it.

neelkanth-kaushik added a commit that referenced this issue May 13, 2025
neelkanth-kaushik added a commit that referenced this issue May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants