- 22 Jan 2025
- 1 Minute à lire
- SombreLumière
- PDF
Troubleshooting binding
- Mis à jour le 22 Jan 2025
- 1 Minute à lire
- SombreLumière
- PDF
It is not always easy to know up front which classes need to be excluded from the binding process, so here are some hints about where to look in case the application crashes at start-up.
If the application terminates unexpectedly during startup, it may be useful to attempt to run the application without any form of binding first. This can be done using a rules file that excludes everything:
untouchable *;
If the application can be started, try to identify the class, method, or field that is causing the problem.
In the event of general binding problems, you will get an exception and stack trace in the log. This message may vary significantly from case to case, depending on the cause, but always includes ClassNotFoundException.
D/dalvikvm( 6367): Added shared lib /data/data/com.example.mytestapp/files/libshield.png 0 ← x4273ffb0
In this case, App Shielding is loaded as a library by the runtime, and the process ID is 6367.
Now, you need to locate messages related to the same process ID, for example:
W/dalvikvm( 6367): Exception Ljava/lang/NullPointerException; thrown while initializing ← Lcom/example/mytestapp/BadClass; I/dalvikvm( 6367): Rejecting re-init on previously-failed class Lcom/example/mytestapp/ ← BadClass; v=0x0
From this message, it is clear that Dalvik attempted to initialize the class BadClass, but failed due to a NullPointerException.
To resolve this, add the following rule to the rules file:
untouchable class com.example.mytestapp.BadClass;
Re-run the Shielding Tool and start from the top.