Hướng dẫn debug trên ios device unity

Welcome to the Android developer guides. These documents teach you how to build Android apps using APIs in the Android framework and other libraries.

If you're brand new to Android and want to jump into code, start with the Build your first Android app tutorial.

And check out these other resources to learn Android development:

  • Codelabs: Short, self-paced tutorials that each cover a discrete topic. Most codelabs step you through the process of building a small app, or adding a new feature to an existing app.
  • Courses: Guided training paths that teach you how to build Android apps.

Otherwise, the following is a small selection of essential developer guides that you should be familiar with.

Essential documentation

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2023-06-05 UTC.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]

By default, Firebase Crashlytics automatically processes your debug symbol (dSYM) files to give you deobfuscated and human-readable crash reports. You usually configure this behavior during the initial setup of Crashlytics in your app, specifically by that automatically uploads dSYM files during your app's build phase.

Unfortunately, there are a few cases that could cause your automatic dSYM files upload to fail. This guide provides some ways to troubleshoot when Crashlytics can't locate your app's dSYM files.

Make sure Xcode can automatically process dSYMs and upload the files

When setting up Crashlytics in your app, you to automatically process dSYMs and upload the files.

Make sure that your configuration for the Crashlytics run script is up-to-date with the new requirements which started with Xcode 15. If your configuration isn't up-to-date, you might be getting the following error: error: Info.plist Error Unable to process Info.plist at path ....

Specifically, Xcode 15 and later requires that you provide a more complete set of file locations. For your Crashlytics run script (firebase-ios-sdk/Crashlytics/run), make sure that you have the following setup:

  1. Click the Build Phases tab, and then expand the Run Script section.
  2. In the Input Files section, make sure you have the paths for the locations of the following files:

    ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME} ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME} ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist $(TARGET_BUILD_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist $(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH) Understand why the locations of these files are needed Xcode looks in the specified locations for these input files to ensure that the build files are available for the run script. Also, if User Script Sandboxing is enabled, Xcode only allows the run script to access files specified in the Input Files.

    • Providing the location of your project's dSYM files enables Crashlytics to process dSYMs.
    • Providing the location of your app's built ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME} 0 file enables Crashlytics to associate the dSYMs with your Firebase app.
    • Providing the location of your app's executable allows the run script to prevent duplicate uploads of the same dSYM. Note that app binaries are not uploaded.

Check if Xcode is producing dSYMs

More often than not, dSYM files go missing because Xcode simply isn't producing them. When an upload fails, Crashlytics displays a "Missing dSYM" alert in the Firebase console. If you get this alert, first check that Xcode is producing the correct dSYM for every build:

  1. Open your project in Xcode, and then select the project file in the Xcode Navigator.
  2. Select your main build target.
  3. Open the target's Build Settings tab, and then click All.
  4. Search for ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME} 1.
  5. Set Debug Information Format to DWARF with dSYM File for all your build types.
  6. Rebuild your app.

Your crash reports should now appear in the Crashlytics dashboard. If the problem persists or you encounter other errors, try and .

Locate your dSYMs on a local machine

Run the following command to display all your dSYMs' UUIDs on your machine and search for the missing dSYM:

mdfind -name .dSYM | while read -r line; do dwarfdump -u "$line"; done

Once you find the dSYM, . If the

${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}

2 command doesn't return any results, you can look in the

${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}

3 directory where your

${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}

4 lives (by default, the

${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}

3 directory is located in

${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}

6). If your app is released to production, you can also look for its dSYM in the

${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}

7 directory on disk:

  1. In Xcode, open the Organizer window, and then select your app from the list. Xcode displays a list of archives for your project.
  2. Control-click an archive to view it in Finder. Control-click it again, and then click Show Package Contents.
  3. Within ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME} 7 is a dSYMs directory that contains dSYMs generated as part of Xcode's archiving process.

Upload your dSYMs

Crashlytics supports multiple ways to upload your dSYMs files, either or .

When you initially set up Crashlytics, you most likely configured this automatic upload behavior for your app. However, if automatic uploads are failing, .

Manually upload your dSYM files

If automatic uploads are failing, you can manually upload your dSYM files using either of the following options.

  • Option 1: Use the console-based "Drag and Drop" option to upload a zip file containing your dSYM files (go to the Firebase console > Crashlytics > dSYMs tab).

Option 2: Use the

${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}

9 script that you can call from anywhere in your build process to manually upload your dSYM files. To run the

${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}

9 script, use either of the following options:

  • Option A: Include the following line in your build process: find dSYM_DIRECTORY -name "*.dSYM" | xargs -I {} $PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp /PATH/TO/GoogleService-Info.plist -p PLATFORM {}
  • Option B: Run the script directly from your terminal: /PATH/TO/PODS/DIRECTORY/FirebaseCrashlytics/upload-symbols -gsp /PATH/TO/GoogleService-Info.plist -p ios /PATH/TO/dSYMs

For usage notes and additional instructions about this script, run

${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}

9 with the

${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist

2 parameter.