'android app startup time increase with dependencies
I have an issue with my app startup. It increase the "Displayed" Time with adding some dependencies (still not used. just added). Problem is that whenever I comment these dependencies it reduces the time up to 20ms
Time with dependencies : 1s56ms Time without dependencies : 1s36ms
Even though i have not used these dependencies. There are no object loaded of these dependencies on memory profiler. So my question is that by just adding dependencies, why it inccreases the "Displayed" time.
Dependencies:
implementation 'com.google.android.libraries.places:places:2.6.0'
implementation 'com.google.android.gms:play-services-maps:18.0.2'
implementation 'com.google.android.gms:play-services-location:19.0.1'
def retrofit_version = "2.9.0"
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
Launching Activity Code:
class MainActivity : AppCompatActivity() {
lateinit var mContext:Context
lateinit var binding:ActivityMainBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
mContext = this
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
binding.btnGo.setOnClickListener {
Intent(mContext,BasicActivity::class.java).also {
startActivity(it)
}
}
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
