יצירה והפעלה של אפליקציה שניתנת לפרופיל באופן ידני
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
כדי ליצור באופן ידני אפליקציה שניתן לפרופיל, צריך
צריך קודם לפתח אפליקציית הפצה ואז לעדכן את קובץ המניפסט שלה,
שהופך את אפליקציית ההפצה לאפליקציה שמאפשרת פרופיל. אחרי שמגדירים את האפליקציה לפרופיל, מריצים את הכלי לניתוח פרופיל ובוחרים תהליך לניתוח.
פיתוח אפליקציית הפצה
כדי ליצור אפליקציה לצורכי פרופילינג:
-
כדי לחתום על האפליקציה באמצעות מפתח ניפוי הבאגים, מוסיפים את השורות הבאות לקובץ build.gradle
של האפליקציה. אם כבר יש לכם גרסת build פעילה של גרסת build, תוכלו לבצע את הפעולות הבאות:
מדלגים לשלב הבא.
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
-
ב-Android Studio, בוחרים באפשרות Build > בוחרים באפשרות 'יצירת וריאנט...' ובוחרים את
של הגרסה החדשה.
שינוי הגרסה המשוחררת לפרופיל
כדי להמיר את גרסת האפליקציה ששוחררה לאפליקציה שאפשר ליצור לה פרופיל, מבצעים את הפעולות הבאות:
-
פותחים את
קובץ AndroidManifest.xml
והוספת הפריטים הבאים בתוך
<application>
. פרטים נוספים זמינים במאמר פיתוח האפליקציה לקראת השקה.
<profileable android:shell="true"/>
-
בהתאם לגרסה של ה-SDK, ייתכן שתופיע שגיאה שקשורה לאימות המניפסט. אם אתם לא מצליחים לפתור את השגיאות וסבורים שבטוח להתייחס אליהן כאזהרות, תוכלו להוסיף את השורות הבאות לקובץ build.gradle
.
aaptOptions {
additionalParameters =["--warn-manifest-validation"]
}
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# Build and run a profileable app manually\n\nTo build a [profileable](/studio/profile#requirements) application manually, you\nneed to first build a release application and then update its manifest file,\nwhich turns the release application into a profileable application. After you\nconfigure the profileable application, launch the profiler and select a\nprofileable process to analyze.\n\nBuild a release app\n-------------------\n\nTo build a release application for profiling purposes, do the following:\n\n\u003cbr /\u003e\n\n1. Sign your application with the debug key by adding the following lines to your application's\n `build.gradle` file. If you already have a working release build variant, you can\n skip to the next step.\n\n buildTypes {\n release {\n signingConfig signingConfigs.debug\n }\n }\n \n2. In Android Studio, select **Build** \\\u003e **Select Build Variant...** and choose the\n release variant.\n\n\u003cbr /\u003e\n\nChange release to profileable\n-----------------------------\n\nTo convert your [release app](#build-release-app) to a profileable app, do the\nfollowing:\n\n1. Open the\n `AndroidManifest.xml` file and adding the following within\n `\u003capplication\u003e`. For more details, see\n [Build your app for release](/studio/publish/preparing#publishing-build).\n\n `\u003cprofileable android:shell=\"true\"/\u003e`\n2. Depending on the SDK version, you might see an error related to manifest\n validation; if you can't resolve them and deem it safe to treat the errors\n as warnings, you can do so by adding the following lines to your\n `build.gradle` file.\n\n aaptOptions {\n additionalParameters =[\"--warn-manifest-validation\"]\n }"]]