ניתוח קריסות באמצעות התכונה 'תובנות לגבי איכות האפליקציה' ו-Gemini
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אתם יכולים להשתמש ב-Gemini ב-Android Studio כדי לנתח את דוחות הקריסה של App Quality Insights, ליצור תובנות, לספק סיכום של הקריסה, ובמידת האפשר להמליץ על השלבים הבאים, כולל קוד לדוגמה וקישורים למסמכים רלוונטיים.
כדי ליצור את כל המידע הזה, לוחצים על Insights (תובנות) בחלון הכלים App Quality Insights (תובנות לגבי איכות האפליקציה) ב-Android Studio אחרי הפעלת Gemini.
לדוגמה, אם נלחץ על תובנות בחלון של הכלי תובנות לגבי איכות האפליקציה עבור האפליקציה לדוגמה שמוצגת כאן, ואז נלחץ על סוג השגיאה הנפוץ ביותר, Gemini יסביר לנו שהאפליקציה קרסה בגלל java.lang NullPointerException.
הוא מאתר את הקובץ שבו הקריסה התרחשה, מציג את קטע הקוד הרלוונטי ומסביר למה הקריסה התרחשה, שלב אחר שלב.
כדי לתקן את הקוד שגורם לקריסה, לוחצים על הצעת תיקון ונפתח קובץ diff של קוד עם השינויים המוצעים בקוד על ידי Gemini. אפשר לדייק עוד יותר את ההנחיה שיצרה את השינויים המוצעים בקוד, או לערוך את הקוד בעצמכם לפני שמאשרים את השינויים.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-31 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-31 (שעון UTC)."],[],[],null,["# Analyze crashes with App Quality Insights and Gemini\n\nUse Gemini in Android Studio to analyze your [App Quality Insights](/studio/debug/app-quality-insights) crash\nreports, generate insights, provide a crash summary, and (when possible)\nrecommend next steps, including sample code and links to relevant documentation.\n\nGenerate all of this information by clicking **Insights** in the **App Quality\nInsights** tool window in Android Studio after you [enable Gemini](/studio/gemini/get-started).\n\nFor example, when we click **Insights** in the **App Quality Insights** tool\nwindow for the depicted sample app and click the most common type of error,\nGemini tells us that the app crashed due to a `java.lang` NullPointerException.\nIt locates the file where the crash originated, shows the relevant code\nsnippet, and walks through why the crash occurred step by step.\n\nTo fix the code that is causing the crash, click **Suggest a fix** and a code\ndiff opens with Gemini's proposed code changes. You can further refine the\nprompt that produced the suggested code changes or edit the code yourself\nbefore accepting the changes."]]