question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Method with invalid locals information from RealmTransformer for Non-Realm Class

See original GitHub issue

The 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:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
eygrabercommented, Jul 13, 2018
0reactions
nhachichacommented, Jul 10, 2018

please re-open if you have more details from the issue tracker

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found