Skip to content
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

java.lang.NoSuchMethodError: No virtual method getProtection()I in class Landroid/content/pm/PermissionInfo #25

Closed
dragonGod97677 opened this issue Jul 17, 2022 · 18 comments
Labels
bug Something isn't working
Milestone

Comments

@dragonGod97677
Copy link
Contributor

dragonGod97677 commented Jul 17, 2022

It works now, it doesn't crash at start (Issue #8).

But when i do this:
Wait for apps to load>tap any app>tap a permission, it crashes, it supposed to open the app's permission settings page

On Permissions tab, when i tap a permission on Permissions tab, it supposed to list apps that uses that perm, but it just crashes

(I'll upload a log tomorrow or the day after)

@TheRealMystic
Copy link
Collaborator

Doesn't crash on my device (Android 12). Can you delete app data and start afresh to see if it happens?

@dragonGod97677
Copy link
Contributor Author

dragonGod97677 commented Jul 17, 2022

Doesn't crash on my device (Android 12). Can you delete app data and start afresh to see if it happens?

Nah, still same, seems device compatibility issue

We need this app compatible to all phones and tablets

@TheRealMystic
Copy link
Collaborator

TheRealMystic commented Jul 17, 2022

Doesn't crash on my device (Android 12). Can you delete app data and start afresh to see if it happens?

We need this app compatible to all phones and tablets

Sure. Which ROM are you using?

@dragonGod97677
Copy link
Contributor Author

Doesn't crash on my device (Android 12). Can you delete app data and start afresh to see if it happens?

We need this app compatible to all phones and tablets

Sure. Which ROM are you using?

Stock Oppo A3s ROM

@d4rken
Copy link
Member

d4rken commented Jul 17, 2022

Need the stacktrace to fix this ☕

@d4rken d4rken added bug Something isn't working Needs Info/Repro Needs more details or reproduction instructions. labels Jul 17, 2022
@TacoTheDank

This comment was marked as off-topic.

@dragonGod97677
Copy link
Contributor Author

dragonGod97677 commented Jul 18, 2022

version 0.1.2 crash logs

v0.1.2-10200-FOSS-RELEASE-3c5352b

@dragonGod97677
Copy link
Contributor Author

dragonGod97677 commented Jul 18, 2022

v0.2.0-20000-FOSS-RELEASE-6215ceb
Crash log

@d4rken
Copy link
Member

d4rken commented Jul 18, 2022

v0.2.0-20000-FOSS-RELEASE-6215ceb
Crash log

Is the same as #32 actually.

Should be fixed with 0.2.1, can you confirm?

@d4rken
Copy link
Member

d4rken commented Jul 18, 2022

version 0.1.2 crash logs
v0.1.2-10200-FOSS-RELEASE-3c5352b

These are different ones.

@d4rken d4rken changed the title More Crashes java.lang.NoSuchMethodError: No virtual method getProtection()I in class Landroid/content/pm/PermissionInfo Jul 18, 2022
@d4rken d4rken removed the Needs Info/Repro Needs more details or reproduction instructions. label Jul 18, 2022
@dragonGod97677
Copy link
Contributor Author

Is the same as #32 actually.

Should be fixed with 0.2.1, can you confirm?

Already downloaded it few minutes ago, gonna do fresh install and will do report, be right back

@dragonGod97677
Copy link
Contributor Author

Okay, so the version i have installed and tested now is 0.2.2-20200-FOSS-RELEASE-2277cd4

Still the same
Wait for apps to load>tap any app>tap a permission, it crashes, it supposed to open the app's permission settings page

On Permissions tab, when i tap a permission on Permissions tab, it supposed to list apps that uses that perm, but it just crashes

4 Crash Logs

@d4rken
Copy link
Member

d4rken commented Jul 18, 2022

Yeah it's still this #25 (comment)
API level issue, something does not exist on your Android versions.

java.lang.NoSuchMethodError: No virtual method getProtection()I in class Landroid/content/pm/PermissionInfo; or its super classes (declaration of 'android.content.pm.PermissionInfo' appears in /system/framework/framework.jar)
	at eu.darken.myperm.permissions.core.types.DeclaredPermission.getProtectionType(DeclaredPermission.kt:52)
	at eu.darken.myperm.permissions.ui.details.items.PermissionOverviewVH$onBindData$1.invoke(PermissionOverviewVH.kt:51)
	at eu.darken.myperm.permissions.ui.details.items.PermissionOverviewVH$onBindData$1.invoke(PermissionOverviewVH.kt:29)
	at eu.darken.myperm.common.lists.BindableVH$DefaultImpls.bind(BindableVH.kt:12)
	at eu.darken.myperm.permissions.ui.details.PermissionDetailsAdapter$BaseVH.bind(PermissionDetailsAdapter.kt:36)
	at eu.darken.myperm.permissions.ui.details.PermissionDetailsAdapter$BaseVH.bind(PermissionDetailsAdapter.kt:36)
	at eu.darken.myperm.common.lists.modular.mods.DataBinderMod.onBindModularVH(DataBinderMod.kt:15)
	at eu.darken.myperm.common.lists.modular.ModularAdapter.onBindBaseVH(ModularAdapter.kt:44)
	at eu.darken.myperm.common.lists.modular.ModularAdapter.onBindBaseVH(ModularAdapter.kt:9)
	at eu.darken.myperm.common.lists.BaseAdapter.onBindViewHolder(BaseAdapter.kt:28)
	at eu.darken.myperm.common.lists.BaseAdapter.onBindViewHolder(BaseAdapter.kt:12)

@d4rken
Copy link
Member

d4rken commented Jul 18, 2022

@dragonGod97677
Copy link
Contributor Author

Api level 28: https://developer.android.com/reference/android/content/pm/PermissionInfo#getProtection()

Is this saying that getProtection() is missing on my device's rom?

Seem oppo a3s is officially not compatible with this app

@d4rken d4rken closed this as completed in 2b9d3ab Jul 18, 2022
@d4rken
Copy link
Member

d4rken commented Jul 18, 2022

Is this saying that getProtection() is missing on my device's rom?

Yes but not because of OPPO, but because it's only available on Android 9+.
I've fixed it though, new build coming...

@dragonGod97677
Copy link
Contributor Author

Is this saying that getProtection() is missing on my device's rom?

Yes but not because of OPPO, but because it's only available on Android 9+. I've fixed it though, new build coming...

Oh wow, it's okay now, thanks

@d4rken
Copy link
Member

d4rken commented Jul 18, 2022

Oh wow, it's okay now, thanks

Sorry it took so long ❤️ now you can help test too 😋

@d4rken d4rken added this to the v1.0.0 milestone Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants