Android Error Codes
Overview
This document lists the error codes that may be returned by UJU Android SDK and their meanings, helping developers quickly troubleshoot and resolve issues.
Common Error Codes
| Error Code | Error Message | Possible Reasons | Solution |
|---|---|---|---|
| 0 | Success | Operation successful | - |
| 1000 | Network Error | Network connection failed | Check network connection, try again later |
| 1001 | Server Error | Server response failed | Try again later, may be a temporary server failure |
| 1002 | Timeout Error | Request timeout | Check network connection, reduce request frequency |
| 1003 | Parameter Error | Request parameters incorrect | Check if parameter format and values are correct |
| 1004 | Permission Error | Missing necessary permissions | Check app permission settings |
| 1005 | Configuration Error | SDK configuration error | Check SDK initialization configuration |
| 1006 | Unknown Error | Error caused by unknown reasons | Contact technical support |
SDK Initialization Errors
| Error Code | Error Message | Possible Reasons | Solution |
|---|---|---|---|
| 2000 | Initialization Failed | SDK initialization failed | Check if App ID and App Key are correct |
| 2001 | App ID Error | App ID incorrect or non-existent | Confirm if App ID is correctly configured in UJU backend |
| 2002 | App Key Error | App Key incorrect | Confirm if App Key matches App ID |
| 2003 | Network Unavailable | Network connection failed | Check network connection, ensure device can access the internet |
| 2004 | Version Incompatibility | SDK version incompatible with system version | Check SDK version requirements, upgrade system or downgrade SDK |
| 2005 | Initialization Timeout | Initialization request timeout | Check network connection, try again later |
Ad Loading Errors
| Error Code | Error Message | Possible Reasons | Solution |
|---|---|---|---|
| 3000 | Ad Loading Failed | Ad loading failed | Check if ad unit ID is correct |
| 3001 | Ad Unit ID Error | Ad unit ID incorrect | Confirm if ad unit ID is correctly configured in UJU backend |
| 3002 | Insufficient Ad Inventory | No available ads | Try again later, or try other ad types |
| 3003 | Ad Loading Timeout | Ad loading timeout | Check network connection, reduce ad loading frequency |
| 3004 | Ad Type Not Supported | Requested ad type not supported | Confirm if ad unit supports this ad type |
| 3005 | Device Not Supported | Device does not support this ad type | Try other ad types, or check device compatibility |
| 3006 | Ad Network Error | Third-party ad network error | Check third-party ad network configuration |
| 3007 | Ad Filtered | Ad was filtered | Check if ad content complies with regulations |
Ad Display Errors
| Error Code | Error Message | Possible Reasons | Solution |
|---|---|---|---|
| 4000 | Ad Display Failed | Ad display failed | Check if ad is loaded |
| 4001 | Ad Not Loaded | Ad not loaded yet | Ensure ad is loaded successfully before displaying |
| 4002 | Ad Expired | Ad has expired | Reload ad |
| 4003 | Display Frequency Limit | Ad display frequency too high | Reduce ad display frequency |
| 4004 | Display Environment Error | Ad display environment incorrect | Ensure ad is displayed in correct context |
| 4005 | Insufficient Permissions | Missing necessary display permissions | Check app permission settings |
Ad Click Errors
| Error Code | Error Message | Possible Reasons | Solution |
|---|---|---|---|
| 5000 | Click Processing Failed | Ad click processing failed | Check if ad status is normal |
| 5001 | Ad Not Clickable | Ad does not support clicks | Confirm if ad type supports clicks |
| 5002 | Click Frequency Limit | Click frequency too high | Reduce ad click frequency |
| 5003 | Click Environment Error | Click environment incorrect | Ensure ad is clicked in correct context |
Third-party Ad Network Errors
| Error Code | Error Message | Possible Reasons | Solution |
|---|---|---|---|
| 6000 | Pangle Error | Pangle ad network error | Check Pangle SDK initialization and configuration |
| 6001 | Youlianghui Error | Youlianghui ad network error | Check Youlianghui SDK initialization and configuration |
| 6002 | Baidu Alliance Error | Baidu Alliance ad network error | Check Baidu Alliance SDK initialization and configuration |
| 6003 | Kuaishou Alliance Error | Kuaishou Alliance ad network error | Check Kuaishou Alliance SDK initialization and configuration |
| 6004 | AdMob Error | AdMob ad network error | Check AdMob SDK initialization and configuration |
| 6005 | Facebook Error | Facebook Audience Network error | Check Facebook SDK initialization and configuration |
| 6006 | Unity Ads Error | Unity Ads ad network error | Check Unity Ads SDK initialization and configuration |
| 6007 | IronSource Error | IronSource ad network error | Check IronSource SDK initialization and configuration |
| 6008 | AppLovin Error | AppLovin ad network error | Check AppLovin SDK initialization and configuration |
Reward-related Errors
| Error Code | Error Message | Possible Reasons | Solution |
|---|---|---|---|
| 7000 | Reward Verification Failed | Reward verification failed | Check user ID and reward parameters |
| 7001 | Reward Issuance Failed | Reward issuance failed | Check reward configuration and issuance logic |
| 7002 | Reward Already Issued | Reward already issued | Avoid duplicate reward issuance |
| 7003 | Reward Parameter Error | Reward parameters incorrect | Check reward parameter format and values |
Data Analysis Errors
| Error Code | Error Message | Possible Reasons | Solution |
|---|---|---|---|
| 8000 | Data Reporting Failed | Data reporting failed | Check network connection, try again later |
| 8001 | Data Format Error | Data format incorrect | Check if data format and values are correct |
| 8002 | Data Volume Exceeded | Data volume exceeds limit | Reduce data reporting frequency, batch report data |
Other Errors
| Error Code | Error Message | Possible Reasons | Solution |
|---|---|---|---|
| 9000 | Unknown Error | Error caused by unknown reasons | Contact technical support |
| 9001 | Resource Error | Resource loading failed | Check app resource files |
| 9002 | Memory Error | Insufficient memory | Optimize app memory usage |
| 9003 | Thread Error | Thread operation error | Check thread operation logic |
Error Handling Best Practices
Error Logging
- Record detailed error logs, including error codes, error messages, and context
- Facilitate subsequent analysis and troubleshooting
Error Retry Mechanism
- Implement reasonable retry mechanisms for temporary issues like network errors
- Set retry intervals and maximum retry times to avoid infinite retries
User-friendly Prompts
- Display friendly error prompts to users based on error types
- Avoid showing technical error information to users
Monitoring and Alerting
- Implement error monitoring and alerting mechanisms
- Discover and resolve batch error issues in a timely manner
Regular Analysis
- Regularly analyze error data to identify common errors and trends
- Optimize app code to reduce the likelihood of errors
Contact Technical Support
If you encounter unresolved error issues, you can contact technical support through the following methods:
- Email: marco@ujuad.com
- Ticket: Submit a ticket in UJU developer backend
- Online Customer Service: Contact online customer service through the official website
Providing error codes, error messages, environment information, and reproduction steps will help technical support locate and resolve issues more quickly.
