Method with invalid locals information from RealmTransformer for Non-Realm Class
See original GitHub issueThe past month or so (which may have correlated with us starting to use D8), I’ve been noticing this log entry every time I built my app (package name changed):
AGPBI: {“kind”:“warning”,“text”:“Methods with invalid locals information:\n com.myapp.RenderOutput com.myapp.ClusterIconGenerator.render(com.myapp.AnimationState, com.myapp.RenderOutput)\n Attempt to define local of type float as $i$f$using”,“sources”:[{“file”:“<path to my app>/app/build/intermediates/transforms/RealmTransformer/debug/0/com/myapp/ClusterIconGenerator.class”}],“tool”:“D8”}
This happens in the :app:transformClassesWithRealmTransformerForDebug
task.
This is the references render
method. Neither the method, nor the class it’s in, reference anything to do with Realm.
fun render(state: AnimationState, output: RenderOutput): RenderOutput {
with(view) {
val count = minOf(state.count, avatarViews.size)
for (index in 0 until count) {
val alpha = state.alpha[index]
val scale = state.scale[index]
val avatar = state.avatars[index]?.apply { updateColor(alpha) } ?: loadingIcon
with(avatarViews[index]) {
avatarViews[index].visibility = View.VISIBLE
setImageDrawable(avatar)
scaleX = scale
scaleY = scale
}
}
for (index in count until avatarViews.size) {
avatarViews[index].visibility = View.GONE
}
// TODO Animate transition
if (state.count > MAX_SLOTS) {
avatarViews.last().visibility = View.GONE
counter.visibility = View.VISIBLE
counter.text = "+${state.count - MAX_SLOTS + 1}"
}
else {
counter.visibility = View.GONE
}
location.visibility = if(state.text.isBlank()) View.GONE else View.VISIBLE
location.text = state.text
updateMeasure()
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Stripped invalid locals information from 1 method - Proguard
ok I've fixed the issue with: -assumenosideeffects class android.util.Log { public static boolean isLoggable(java.lang.
Read more >src/main/java/com/android/tools/r8/utils/InternalOptions.java - r8
import java.util.function.Function;. public class InternalOptions {. public enum LineNumberOptimization { ... "Stripped invalid locals information from ".
Read more >Warning: Stripped invalid locals information from 1 method ...
Warning: Stripped invalid locals information from 1 method. Methods with invalid locals information: java.lang.Object kotlin.collections.
Read more >ProGuard Manual: Troubleshooting - Guardsquare
A program class is referring to a field or a method that is missing from a library class. The warning lists both the...
Read more >ProGuard Troubleshooting
InvalidClassException, class loading error, or verification error ... Otherwise, ProGuard will obfuscate its name, thus changing the method's signature.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Filed https://issuetracker.google.com/issues/111404865
please re-open if you have more details from the issue tracker