Skip to main content

Troubleshooting

Common Issues and Solutions​

App shows Prepare Failed error​

If you encounter the "Prepare Failed" error, it typically indicates a problem with the SDK initialization. The sample app will launch, but it will show the "Prepare Failed" error message, but the app may fail to set up the SDK. This is most commonly attributed to incorrect or missing license credentials.

Troubleshooting Steps:

  1. Check Credentials: Verify that the LICENSE_KEY and TOKEN in your local.properties file are correct. Ensure there are no typos or extra spaces.
  2. Internet Connection: Ensure that your device has an active internet connection during the first run, as the SDK needs to validate the license online.
  3. Logcat Review: Check the logcat output for specific error messages related to SDK initialization. Look for lines containing [Snapshot] [error] for clues. Check the Error handling section for more details on error codes.
  4. Rebuild the Project: If your app ships the credentials, make sure to test with the latest local.properties.

Make sure to include all of the required files from the SDK package in your project. See the Project Structure section for details, and make sure to include all the files in the app/src/main/jniLibs/arm64-v8a/ directory, as well as the app/src/main/assets/ directory.

If the issue persists after following these steps, please contact Plate Recognizer Support for further assistance.

Common Build Problems​

Problem: "NDK is missing a 'platforms' directory" Solution:

# Install NDK through SDK Manager
# Or specify NDK path in local.properties
ndk.dir=/path/to/android-ndk

Problem: "CMake was not found in PATH" Solution: Install CMake through Android Studio SDK Manager

Problem: "armeabi-v7a is not supported" Solution: The project is configured for ARM64 only. Ensure you're building for arm64-v8a.

Gradle Build Issues​

If you encounter Gradle issues:

# Clean the project
./gradlew clean

# Invalidate caches (Android Studio)
# File > Invalidate Caches and Restart

# Rebuild
./gradlew assembleDebug

Device Compatibility​

Problem: App crashes on startup Solution:

  • Ensure device is ARM64 (arm64-v8a)
  • Check Android version is at least 7.0+ (API 24+)
  • Verify license key is valid

Problem: "Emulator detected" Solution: The SDK doesn't support emulators. Use a physical ARM64 device.

Sample App Customization​

Modifying Test Images​

  1. Add your test images to the app/src/main/assets/ directory
  2. Update the sample app code to reference your images
  3. Rebuild the app

Customizing UI​

The sample app's UI is in app/src/main/res/. You can modify:

  • Layout files (XML)
  • String resources
  • Colors and themes
  • Icons and images

Adding Features​

The sample app demonstrates basic functionality. You can extend it by:

  • Adding real-time camera processing
  • Implementing batch image processing
  • Adding result export functionality
  • Creating custom UI components

Performance Optimization​

For Better Performance​

  1. Use Release Builds: Release APKs are optimized for performance
  2. Device Specifications: Use devices with 4GB+ RAM for best results. Please refer to the Device Requirements for details.
  3. Image Quality: Use well-lit, focused images for accurate recognition
  4. Background Processing: Process images on background threads

Monitoring Performance​

The sample app displays:

  • Processing time per image
  • Memory usage
  • Recognition confidence scores

Monitor these metrics to optimize your implementation.

Support​

For questions or support, please contact us.