История изменений
Исправление bryak, (текущая версия) :
val srvName: String = Context.TELEPHONY_SERVICE
val telMng: TelephonyManager = (TelephonyManager) getSystemService(srvName)
// val phoneType: Int = telMng.getSimCountryIso
Log.d("TAG", telMng.getSimCountryIso().toString())
out:
> Task :app:compileDebugKotlin FAILED
e: /home/user/media/source_project/socialkotlin/app/src/main/java/com/example/socialkotlin/MainActivity.kt: (184, 42): Classifier 'TelephonyManager' does not have a companion object, and thus must be initiali\
zed here
Исправление bryak, :
val srvName: String = Context.TELEPHONY_SERVICE
val telMng: TelephonyManager = (TelephonyManager)getSystemService(srvName)
// val phoneType: Int = telMng.getSimCountryIso
Log.d("TAG", telMng.getSimCountryIso().toString())
out:
> Task :app:compileDebugKotlin FAILED
e: /home/user/media/source_project/socialkotlin/app/src/main/java/com/example/socialkotlin/MainActivity.kt: (184, 42): Classifier 'TelephonyManager' does not have a companion object, and thus must be initiali\
zed here
Исправление bryak, :
val srvName: String = Context.TELEPHONY_SERVICE
val telMng: TelephonyManager = (TelephonyManager)getSystemService(srvName)
// val phoneType: Int = telMng.getSimCountryIso
Log.d("TAG", telMng.getSimCountryIso().toString())
out:
> Task :app:compileDebugKotlin FAILED
e: /home/user/media/source_project/socialkotlin/app/src/main/java/com/example/socialkotlin/MainActivity.kt: (184, 42): Classifier 'TelephonyManager' does not have a companion object, and thus must be initiali\
zed here
Исходная версия bryak, :
val srvName: String = Context.TELEPHONY_SERVICE
val telMng: TelephonyManager = (TelephonyManager)getSystemService(srvName)
// val phoneType: Int = telMng.getSimCountryIso kotlin: Classifier 'TelephonyManager' does not have a companion object, and thus must be initialized
Log.d("TAG", telMng.getSimCountryIso().toString())
out:
> Task :app:compileDebugKotlin FAILED
e: /home/user/media/source_project/socialkotlin/app/src/main/java/com/example/socialkotlin/MainActivity.kt: (184, 42): Classifier 'TelephonyManager' does not have a companion object, and thus must be initiali\
zed here