Sketchware-Pro / Sketchware-Pro

Sketchware Pro's sources in Java. Now anyone can contribute to Sketchware Pro.
https://sketchware.pro
Other
863 stars 254 forks source link

error in Proguard #493

Closed AdesonBezerra closed 1 year ago

AdesonBezerra commented 1 year ago

I was using test build 01, when I updated to test build 04 it gave this error.

Caused by: com.android.tools.r8.internal.Hc: Class content provided for type descriptor com.coclew.r actually defines class com.coclew.R

Suppressed: java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.android.tools.r8.internal.Dj: com.android.tools.r8.internal.Dj: com.android.tools.r8.internal.Hc: Class content provided for type descriptor com.coclew.r actually defines class com.coclew.R

Caused by: java.util.concurrent.ExecutionException: com.android.tools.r8.internal.Dj: com.android.tools.r8.internal.Dj: com.android.tools.r8.internal.Hc: Class content provided for type descriptor com.coclew.r actually defines class com.coclew.R

Caused by: com.android.tools.r8.internal.Dj: com.android.tools.r8.internal.Dj: com.android.tools.r8.internal.Hc: Class content provided for type descriptor com.coclew.r actually defines class com.coclew.R

[CIRCULAR REFERENCE:com.android.tools.r8.internal.Hc: Class content provided for type descriptor com.coclew.r actually defines class com.coclew.R]

Screenshot_20220707-130152_Sketchware Pro Screenshot_20220707-130143_Sketchware Pro Screenshot_20220707-130131_Sketchware Pro Screenshot_20220707-130103_Sketchware Pro

JavkhlanK commented 1 year ago

This was already mentioned in the v6.4.0-rc04 release notes as known bug, but now this Issue will keep track of it.

AdesonBezerra commented 1 year ago

The cd92a4a fix solved part of the problem, now it only has this error attached.

Screenshot_20220712-203400_Sketchware Pro Screenshot_20220712-203400_Sketchware Pro

JavkhlanK commented 1 year ago

Did you use Kotlin code in that project?

AdesonBezerra commented 1 year ago

No

JavkhlanK commented 1 year ago

Alright, I finally got to reproduce that bug. Will try to fix now.

AdesonBezerra commented 1 year ago

Cool, I'm looking forward to being able to use proguard in the new update

AdesonBezerra commented 1 year ago

Looks like some google classes use kotlin metadata

JavkhlanK commented 1 year ago

Can you try using the latest Actions-built APK? I think commit 89f881099107764f6448277248da8aaadc38fa74 has fixed the bug.

AdesonBezerra commented 1 year ago

Screenshot_20220715-154339_Sketchware Pro

JavkhlanK commented 1 year ago

Can you first open up Local library Manager and note down all enabled Local libraries, then delete /Internal storage/.sketchware/data//local_library, then open Local library Manager again, enable all previously noted down libraries, and try building your project again?

All this, because I think that error isn't related to the ProGuard logic.

AdesonBezerra commented 1 year ago

it only worked after I disabled those options.

Screenshot_20220715-162243_Sketchware Pro

AdesonBezerra commented 1 year ago

There is no need to encrypt the libraries, so I believe this issue has been resolved.

JavkhlanK commented 1 year ago

Okay, got to reproduce that one as well. I'll work on it, and no, it is a bug.

AdesonBezerra commented 1 year ago

I needed to update firebase to 19.3.0 and proguard doesn't work anymore, as soon as you guys fix this bug, please update firebase too, it has a nice feature to use in sk pro.

JavkhlanK commented 1 year ago

I needed to update firebase to 19.3.0 and proguard doesn't work anymore, as soon as you guys fix this bug, please update firebase too, it has a nice feature to use in sk pro.

469, though I don't want to update the versions built-in into Sketchware Pro. Library version upgrades can break stuff, especially if the major version number gets bumped, and I don't want complaints from inexperienced users about their code not working anymore.

Rather, I'd like to add a "don't include this built-in library" setting for advanced users, which then can use newer (or even older!) Local libraries as replacements instead.

AdesonBezerra commented 1 year ago

cool

JavkhlanK commented 1 year ago

The Local library Full mode bug should have been fixed with 8a37753bead86a7a78d0dd7cd4419581b058e8fb, could you please test this build out: https://github.com/Sketchware-Pro/Sketchware-Pro/actions/runs/2896019714

JavkhlanK commented 1 year ago

Was the bug fixed?

AdesonBezerra commented 1 year ago

Yes

JavkhlanK commented 1 year ago

Great!