android studio - I want gradle to build only single class instead of the whole project -


in android studio project have separate class experiment java code. class has method public static void main(string[] args){}

right click on class in project tree -> run (ctrl+shift+f10)

and noticed gradle starts building whole project. , takes time want build , run 1 class. fast possible. how can achieve this?

you can try modifying androidmanifest file run class want main-launcher class:

<application         android:name=".myapplication"         android:allowbackup="true"         android:icon="@drawable/my_icon"         android:label="@string/app_name"         android:supportsrtl="true"         android:theme="@style/apptheme"         tools:replace="android:icon,android:theme">          <activity             android:name=".run_your_activity"             android:screenorientation="portrait">             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity> 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -