gunschu / jitsi_meet

Initial commit
208 stars 281 forks source link

Mismatch Data type in kotlin -> JitsiMeetPlugin.kt: (66, 42) #393

Closed ctkqiang closed 1 year ago

ctkqiang commented 2 years ago

jitsi_meet plugin version jitmi_meet:4.0.0

Describe the bug the code return

jitsi_meet-4.0.0\android\src\main\kotlin\com\gunschu\jitsi_meet\JitsiMeetPlugin.kt: (32, 38): Null can not be a value of a non-null type Activity
e: C:\flutter\.pub-cache\hosted\pub.dartlang.org\jitsi_meet-4.0.0\andr

suspect that the error caused by

    private var activity: Activity? = null

@jimmyjose-dev @rwbr @mosleim @buzzwin @agfeo

ctkqiang commented 2 years ago

Error:

JitsiMeetPlugin.kt C:\src\flutter.pub-cache\hosted\pub.dartlang.org\
jitsi_meet-4.0.0\android\src\main\kotlin\com\gunschu\jitsi_meet\
JitsiMeetPlugin.kt: (66, 42): 
Type mismatch: inferred type is Activity? but Activity was expected

Problem :

https://github.com/gunschu/jitsi_meet/blob/97154d582969af1155489bd066d280d85054e5c7/jitsi_meet/android/src/main/kotlin/com/gunschu/jitsi_meet/JitsiMeetPlugin.kt#L34

Solved it by

constructor(activity: Activity?) : this() {
        this.activity = activity
}
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

arcechava commented 2 years ago

Thanks !!!

anonnothing commented 2 years ago

Error:

JitsiMeetPlugin.kt C:\src\flutter.pub-cache\hosted\pub.dartlang.org\
jitsi_meet-4.0.0\android\src\main\kotlin\com\gunschu\jitsi_meet\
JitsiMeetPlugin.kt: (66, 42): 
Type mismatch: inferred type is Activity? but Activity was expected

Problem :

https://github.com/gunschu/jitsi_meet/blob/97154d582969af1155489bd066d280d85054e5c7/jitsi_meet/android/src/main/kotlin/com/gunschu/jitsi_meet/JitsiMeetPlugin.kt#L34

Solved it by

constructor(activity: Activity?) : this() {
        this.activity = activity
}

You saved my life. 💪👍

rwbr commented 2 years ago

It's nice, that you could solve this problem. So what does hold you back publishing a corrected version of that package?

ctkqiang commented 2 years ago

It's nice, that you could solve this problem. So what does hold you back publishing a corrected version of that package?

Permission. I don't have the permission yet.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.