9

I am currently stuck on an error that continues to slow down the performance of my application.

The error does not cause the application to close or crash, or to write an exception to the console. The console simply reports this message:

E/iardini.error0: Invalid ID 0x00000001.

The only things that emerge from the message are:

  • It's an error, you understand from the prefix "E/"
  • The error is within my app, "iardini.error0"
  • Didn't recognize some kind of id

How replicate the error: I've made a public repository on github so you can just download the source code and lunch it! You will see right away that the error will show up inside the console.

enter image description here

What does the error message depend on? How can I fix it?

Thanks in advance!

G. Ciardini
  • 1,210
  • 1
  • 17
  • 32
  • Running it on a Pixel 4 Emulator with API 29 does not throw this error :/ – Tobi Nov 14 '20 at 11:42
  • Try to Clean your project – Francesco Bocci Nov 16 '20 at 13:53
  • @FrancescoBocci thanks for tip but i've already try it! – G. Ciardini Nov 16 '20 at 14:14
  • Did you try this: https://stackoverflow.com/questions/5462043/how-to-fix-problem-with-resources-on-android ? – Dan Baruch Nov 16 '20 at 14:30
  • @DanBaruch as you can see from the public [repository](https://github.com/Ciardini/error03) there is no `setViewValue` function!! – G. Ciardini Nov 17 '20 at 11:54
  • It's not about setViewValue, the error indicates that somewhere along the code, there is a search for ID, 1, that can't be found. So I thought maybe the answers there might describe a similar case to your code that give you a direction about the error, like, 1 of the solutions there is to delete gen folder (if you have one). So maybe that might help – Dan Baruch Nov 17 '20 at 12:25
  • @DanBaruch i can confirm you that by deleting the gen folder it doesn't change anything! – G. Ciardini Nov 18 '20 at 15:00
  • @G.Ciardini I am having the same problem, did you find a solution to this? It started for me after introducing a shared element transition from one fragment to another. I am using a Pixel4 API29 emulator btw. – arne.jans Jan 21 '21 at 16:49
  • Sorry I just noticed, the error and slow app was due to the layout inspector being active in Android Studio. Closing the layout inspector made the app fluffy and error free for me. Maybe this was the same origin of problem for you? – arne.jans Jan 21 '21 at 16:54
  • @arne.jans i keep having the same error even with the layout inspector being closed. – G. Ciardini Jan 22 '21 at 14:05
  • 1
    I'm having the same problem in my application. The funny thing is that the problem only appears on one of my devices, both devices run Android 11 (API 30). Works fine on Pixel 3a, getting `Invalid ID 0x00000001` on OnePlus Nord. – rdrmntn Jul 24 '21 at 22:06
  • And I have confirmed that the problem has to do with migrating from `ViewPager` to `ViewPager2`. – rdrmntn Jul 24 '21 at 22:18
  • ViewPager is marked deprecated so using ViewPager is no solution, but you may want to try if that makes any difference for you. – rdrmntn Jul 26 '21 at 20:17

1 Answers1

5

In any TextView, you had .setText() with an integer value, change to String value your error will be solved.

nyconing
  • 1,092
  • 1
  • 10
  • 33
Roshani Patel
  • 51
  • 1
  • 2
  • What do you mean? can you show me an example? – G. Ciardini Apr 21 '21 at 09:05
  • 1
    For Ex: TextView textview; textview= findViewById... // here you have pass integer variable or value suppose int i=10; textview.setText(i); //not working change to textview.setText(i.toString()); //perfectly working – Roshani Patel Apr 22 '21 at 10:07