admin管理员组文章数量:1356852
I'm trying to use Gemini Nano in my Android app, but I always get the same error:
AICore failed with error type 2-INTERFERENCE_ERROR and error code 8-NOT_AVAILABLE: Requited LLM feature not found.
I have a basic implementation:
aicore = { module = "com.google.ai.edge.aicore:aicore", version.ref = "0.0.1-exp02" }
val generationConfig = generationConfig {
context = currentContext
}
val downloadCallback = object : DownloadCallback {
override fun onDownloadStarted(bytesToDownload: Long) {
Log.d("Gemini", "onDownloadStarted")
}
override fun onDownloadFailed(failureStatus: String, e: GenerativeAIException) {
Log.e("Gemini", "onDownloadFailed", e)
}
override fun onDownloadProgress(totalBytesDownloaded: Long) {
Log.d("Gemini", "onDownloadProgress")
}
override fun onDownloadCompleted() {
Log.d("Gemini", "onDownloadCompleted")
}
}
val downloadConfig = DownloadConfig(downloadCallback)
val generativeModel = GenerativeModel(generationConfig, downloadConfig)
Button(
onClick = {
coroutineScope.launch {
isLoading = true
try {
val response = generativeModel.generateContent(
"my promt"
)
} catch (e: GenerativeAIException) {
Toast.makeText(currentContext, "Error generando texto", Toast.LENGTH_SHORT).show()
Log.e("Gemini", "Error generando contenido", e)
} finally {
isLoading = false
}
}
},
enabled = !isLoading
) {
Text(if (isLoading) "Loading..." else "Generar respuesta")
}
I’ve followed all the required steps:
Joined the aicore-experimental Google group
Opted in to the Android AICore testing program
Updated the AICore app (to at least version 0.thirdpartyeap)
Updated Private Compute Services (to a version higher than 1.0.release.658389993)
Everything was testing with a real device Pixel 9 pro. SDK 35
I also tried going to the AICore settings under Developer Options, but now there’s no toggle—just a screen with terms and conditions to read.
Has anyone faced this same issue? Is there something else I’m missing?
本文标签:
版权声明:本文标题:android - Gemini Nano — AICore failed with INTERFERENCE_ERRORNOT_AVAILABLE (Required LLM feature not found) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744037021a2579962.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论