
Return new AndroidRunState(env, getName(), module, applicationIdProvider, getConsoleProvider(), deviceFutures, providerFactory, processHandler) If ((supportsInstantRun()) & (instantRunEnabled) & (existingSessionInfo != null)) 源代码位置:android/android/src/com/android/tools/idea/run/AndroidRunConfigurationBase.java public RunProfileState Executor ExecutionEnvironment env)ĭeviceFutures = deployTarget.getDevices(deployTargetState, facet, getDeviceCount(isDebugging), isDebugging, getUniqueID()) 以上是 Android Studio 对 IDEA 扩展中代码中对 Run Configuration 流程的说明。ĪS 对 IDEA 扩展的代码放在: JetBrains/android。打包进 AS 之后,代码位于:ANDROID_STUDIO/plugins/android/lib/android.jar Once the build is complete, the actual deployment is performed by the AndroidRunState.execute method.At this point, AndroidRunConfigurationBase.getState is called, and it constructs and returns an AndroidRunState

In this section, we look at the specific parts implemented within the android plugin. The previous section talked about the overall execution flow. Javac 编译 R.java 、Java 代码 、Java Classes 生成.


:app:transformClassesWithDexBuilderForRelease 2s 292ms :app:compileReleaseJavaWithJavac 2s 264ms :app:createReleaseCompatibleScreenManifests 73ms ,可以看到执行的 tasks 如下: completed successfully 51s 886ms
