提问人:Marwan Talal 提问时间:1/16/2023 最后编辑:Marwan Talal 更新时间:3/13/2023 访问量:718
此方法只能从测试或在专用范围内访问
This method should only be accessed from tests or within private scope
问:
如何解决此警告:
此方法只能从测试或在专用范围内访问
它将android studio升级到最新版本后出现!!
@Composable
fun AppBody() {
val navController = rememberNavController()
val context = LocalContext.current
val width = LocalConfiguration.current.screenWidthDp
Scaffold(
bottomBar = {
AndroidView(
factory = {
AdView(it).apply {
setAdSize(
AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize(
context,
width
)
)
adUnitId = "*****"
loadAd(AdRequest.Builder().build())
}
},
)
},
content = {
Box(Modifier.padding(it)) {
AppNavHostController(navController = navController)
}
}
)
}
答:
0赞
georgiecasey
3/13/2023
#1
它只是意味着您尝试更改的任何内容(我认为)都有注释。adUnitId
@VisibleForTesting
评论