Faid Alagbe
07/11/2025, 9:36 AMFaid Alagbe
07/11/2025, 9:36 AMA failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction> Android resource linking failed aapt2.exe E 07-11 112826 25748 29600 LoadedArsc.cpp:94] RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data. aapt2.exe E 07-11 112826 25748 29600 ApkAssets.cpp:149] Failed to load resources table in APK 'C:\Users\HP Elitebook\AppData\Local\Android\sdk\platforms\androi d-35\android.jar'. error: failed to load include path C:\Users\HP Elitebook\AppData\Local\Android\sdk\platforms\android-35\android.jar. * Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.============================================================================== 2: Task failed with an exception. ----------- * What went wrong: Execution failed for task 'appbundleReleaseResources'.
A failure occurred while executing com.android.build.gradle.internal.res.Aapt2ProcessResourcesRunnable> Android resource linking failed aapt2.exe E 07-11 112826 21836 29372 LoadedArsc.cpp:94] RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data. aapt2.exe E 07-11 112826 21836 29372 ApkAssets.cpp:149] Failed to load resources table in APK 'C:\Users\HP Elitebook\AppData\Local\Android\sdk\platforms\androi d-35\android.jar'. error: failed to load include path C:\Users\HP Elitebook\AppData\Local\Android\sdk\platforms\android-35\android.jar. * Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.============================================================================== * Get more help at https://help.gradle.org BUILD FAILED in 2m 2s Running Gradle task 'assembleRelease'... 123,8s Gradle task assembleRelease failed with exit code 1
Vareli Tecsoft
07/16/2025, 7:48 AMRun with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.* Exception is: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '8.2', apply: false] was not found in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Plugin Repositories (could not resolve plugin artifact 'com.android.applicationcom.android.application.gradle.plugin8.2')
Brandon Mwakasege
07/21/2025, 1:12 PMRun with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.* Exception is: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.application', version: '8.11.1', apply: false] was not found in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Included Builds (No included builds contain this plugin) - Plugin Repositories (could not resolve plugin artifact 'com.android.applicationcom.android.application.gradle.plugin8.11.1') Searched in the following repositories: Google MavenRepo Gradle Central Plugin Repository
Mohammed Mahmood Ahmed
07/27/2025, 3:54 PMAndrzej Zabost
07/30/2025, 12:10 PMw: [ksp] Schema export directory was not provided to the annotation processor so Room cannot export the schema. You can either provide `room.schemaLocation` annotation processor argument by applying the Room Gradle plugin (id 'androidx.room') OR set exportSchema to false.
depending on how the plugin is applied?
---
Method 1 (everything is fine, schema is generated, no warnings)
libs.versions.toml
[versions]
room = "2.7.2"
[plugins]
room = { id = "androidx.room", version.ref = "room" }
app/build.gradle.kts
plugins {
// ...
alias(libs.plugins.room)
}
android {
room {
schemaDirectory("$projectDir/schemas")
}
}
---
Method 2 (doesn't work, "_Schema export directory was not provided ..._")
[versions]
room = "2.7.2"
[libraries]
room-plugin = { module = "androidx.room:room-gradle-plugin", version.ref = "room" }
[plugins]
room = { id = "androidx.room" } // no version here
build.gradle.kts (root project)
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath(libs.room.plugin)
}
}
app/build.gradle.kts
(no changes - same as before)
plugins {
// ...
alias(libs.plugins.room)
}
android {
room {
schemaDirectory("$projectDir/schemas")
}
}Andrew Grosner
08/01/2025, 2:57 PMAsehinde Juwon
08/08/2025, 2:09 PM* What went wrong:
Execution failed for task ':app:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.
BUILD FAILED in 5m 47s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.Jean Tuffier
08/22/2025, 1:28 PMDuplicate class com.google.protobuf.DescriptorProtos found in modules protobuf-javalite-4.32.0.jar -> protobuf-javalite-4.32.0 (com.google.protobufprotobuf javalite4.32.0) and protolite-well-known-types-18.0.1.aar -> protolite-well-known-types-18.0.1-runtime (com.google.firebaseprotolite well known types18.0.1)
β¦I removed the direct dependency to
javalite from my project, I tried whatβs recommended here, I ask chatGPT and Claude for help but nothing to avail. Has anyone got those conflict issues and managed to fix them?Colton Idle
09/23/2025, 7:46 PMSaid Shatila
10/01/2025, 3:40 PMjava.lang.AbstractMethodError: Receiver class androidx.room.migration.bundle.FieldBundle$$serializer does not define or inherit an implementation of the resolved method 'abstract kotlinx.serialization.KSerializer[] typeParametersSerializers()' of interface kotlinx.serialization.internal.GeneratedSerializer.
at kotlinx.serialization.internal.PluginGeneratedSerialDescriptor$typeParameterDescriptors$2.invoke(PluginGeneratedSerialDescriptor.kt:40)
at kotlinx.serialization.internal.PluginGeneratedSerialDescriptor$typeParameterDescriptors$2.invoke(PluginGeneratedSerialDescriptor.kt:39)
at kotlin.SafePublicationLazyImpl.getValue(LazyJVM.kt:122)
at kotlinx.serialization.internal.PluginGeneratedSerialDescriptor.getTypeParameterDescriptors$kotlinx_serialization_core(PluginGeneratedSerialDescriptor.kt:39)
at kotlinx.serialization.internal.PluginGeneratedSerialDescriptor$_hashCode$2.invoke(PluginGeneratedSerialDescriptor.kt:44)
at kotlinx.serialization.internal.PluginGeneratedSerialDescriptor$_hashCode$2.invoke(PluginGeneratedSerialDescriptor.kt:44)
at kotlin.SafePublicationLazyImpl.getValue(LazyJVM.kt:122)
at kotlinx.serialization.internal.PluginGeneratedSerialDescriptor.get_hashCode(PluginGeneratedSerialDescriptor.kt:44)
It happened when I added KotlinXSerialization to my Database module.
plugins {
alias(libs.plugins.yinzcam.library)
alias(libs.plugins.yinzcam.hilt)
alias(libs.plugins.yinzcam.room)
alias(libs.plugins.kotlin.serialization)
}
android {
namespace = "yinz.cam.database"
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"<http://proguard-rules.pro|proguard-rules.pro>"
)
}
}
hilt {
enableAggregatingTask = true
}
}
dependencies {
implementation(libs.kotlinx.serialization.lib)
}Julian Molina
10/24/2025, 2:36 PMMaksym Moroz
10/29/2025, 10:45 PMlanguageSettings { } unavailable inside KotlinAndroidProjectExtension?Colton Idle
10/31/2025, 2:41 PMandroid {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatbility JavaVersion.VERSION_17
}
kotlin {
jvmToolchain(17)
}
kotlinOptions {
jvmTarget = '17'
}
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions { jvmTarget.set(JvmTarget.JVM_17) }
}
I can consolidate all of that... right? What's the "right" way?nisikawa yasunori
11/05/2025, 2:13 AMnisikawa yasunori
11/06/2025, 6:48 AMnisikawa yasunori
11/06/2025, 8:02 AMKenny Jimno
11/07/2025, 4:22 AMEmmanuel Anyebe
11/09/2025, 10:02 AMnisikawa yasunori
11/10/2025, 12:17 AMColton Idle
11/20/2025, 2:39 PMenableUnitTestCoverage = true in build.gradle and now I have an additional task in gradle called :app:createDebugUnitTestCoverageReport which generates an html report. this is great.
At a baseline... enabling code cov (via jacoco) wasn't hard.
Customizing it though does seem hard
1. Calling plugins { jacoco } is not necessary?
2. How can I remove classes/packages from being included in the coverage report?
3. enableAndroidTestCoverage = true but I dont get any gradle task generated to create those reportsColton Idle
11/20/2025, 4:53 PMColton Idle
11/21/2025, 6:57 PMHamed Balaira
11/25/2025, 7:47 PMColton Idle
12/19/2025, 6:05 AMversionName = "1.2.3" + (project.findProperty("versionNameSuffix") ?: "")
is this project.findProperty on versionName acceptable, or is this one of those weird things that will invalidate AndroidManifest, causing a bunch of slowness even on local builds (again, versionNameSuffix doesn't exist EXCEPT on CI builds)sivaprasad kuna
12/22/2025, 2:54 PMsivaprasad kuna
12/22/2025, 2:54 PMpackage com.example.jrmapp2
import android.accounts.Account
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.util.Log
import android.view.View
import android.widget.AdapterView
import android.widget.ArrayAdapter
import android.widget.Button
import android.widget.Spinner
import android.widget.Toast
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.credentials.CredentialManager
import androidx.credentials.GetCredentialRequest
import com.google.android.libraries.identity.googleid.GetGoogleIdOption
import androidx.credentials.exceptions.GetCredentialException
import androidx.credentials.exceptions.NoCredentialException
import com.google.android.libraries.identity.googleid.GetSignInWithGoogleOption
import androidx.lifecycle.lifecycleScope
import com.google.android.libraries.identity.googleid.GoogleIdTokenCredential
import com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential
import com.google.api.client.http.javanet.NetHttpTransport
import com.google.api.client.json.gson.GsonFactory
import com.google.api.services.drive.Drive
import com.google.api.services.drive.DriveScopes
import com.google.api.services.drive.model.File as DriveFile
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import java.io.ByteArrayOutputStream
class MainActivity : AppCompatActivity() {
private lateinit var driveService: Drive
private lateinit var spinner: Spinner
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContentView(R.layout.activity_main)
// Initialize UI components
spinner = findViewById(R.id.spinner)
val closeButton: Button = findViewById(R.id.closeButton)
val openButton: Button = findViewById(R.id.openButton)
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
insets
}
startGoogleSignIn()
closeButton.setOnClickListener { finish() }
openButton.setOnClickListener {
val intent = Intent(this, MainActivity2::class.java)
startActivity(intent)
}
}
private fun startGoogleSignIn() {
val credentialManager = CredentialManager.create(applicationContext)
// Replace with your actual Web Client ID from Google Cloud Console
val googleIdOption = GetGoogleIdOption.Builder()
.setServerClientId("515018532-pjgll997ds3r60mbg.apps.googleusercontent.com")
.setFilterByAuthorizedAccounts(false)
.build()
val request = GetCredentialRequest.Builder()
.addCredentialOption(googleIdOption)
.build()
lifecycleScope.launch {
try {
val result = credentialManager.getCredential(this@MainActivity,request)
val googleCred = GoogleIdTokenCredential.createFrom(result.credential.data)
// Get user account
val email = googleCred.id ?: "" // Using .id as the primary identifier
val account = Account(email, "com.google")
// --- START: ADDED CODE ---
// Display a success message to the user
withContext(Dispatchers.Main) {
Toast.makeText(
applicationContext,
"Successfully signed in as $email",
Toast.LENGTH_SHORT
).show()
}
// --- END: ADDED CODE -
// Initialize the Drive Service
driveService = getDriveService(this@MainActivity, account)
// Fetch files from a specific folder (replace 'root' or a specific ID)
fetchDriveFiles("1BYFxtbF9O1QEMpmzg-PcqU")
} catch (e: Exception) {
Log.e("Credential", "Sign-in failed", e)
}
}
}
private fun getDriveService(context: Context, account: Account): Drive {
val credential = GoogleAccountCredential.usingOAuth2(
//context, listOf(DriveScopes.DRIVE_FILE, DriveScopes.DRIVE_METADATA_READONLY)
context, listOf(DriveScopes.DRIVE_READONLY) // Changed from DRIVE_FILE
)
credential.selectedAccount = account
return Drive.Builder(NetHttpTransport(), GsonFactory.getDefaultInstance(), credential)
.setApplicationName("JRM app2")
.build()
}
private fun fetchDriveFiles(folderId: String) {
lifecycleScope.launch(Dispatchers.IO) {
try {
val query = "'$folderId' in parents and trashed = false"
val result = driveService.files().list()
.setQ(query)
.setFields("files(id, name)")
.execute()
val files = result.files ?: emptyList()
withContext(Dispatchers.Main) {
updateSpinner(files)
}
} catch (e: Exception) {
Log.e("Drive", "Error fetching files", e)
}
}
}
private fun updateSpinner(fileList: List<DriveFile>) {
val fileNames = fileList.map { it.name ?: "Unknown File" }
val adapter = ArrayAdapter(this, android.R.layout.simple_spinner_item, fileNames)
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item)
spinner.adapter = adapter
spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
val selectedFileId = fileList[position].id
openDriveFile(selectedFileId)
}
override fun onNothingSelected(parent: AdapterView<*>?) {}
}
}
private fun openDriveFile(fileId: String) {
lifecycleScope.launch(Dispatchers.IO) {
try {
val outputStream = ByteArrayOutputStream()
driveService.files().get(fileId).executeMediaAndDownloadTo(outputStream)
Log.d("Drive", "File downloaded, size: ${outputStream.size()}")
// Further processing of outputStream here
} catch (e: Exception) {
Log.e("Drive", "Error downloading file", e)
}
}
}
}sivaprasad kuna
12/22/2025, 2:55 PMMrSteel
02/16/2026, 6:42 PMvariables:
GRADLE_OPTS: "-Xmx2048m -Dfile.encoding=UTF-8 -Dorg.gradle.daemon=false -Dkotlin.incremental=false -Djava.awt.headless=true -Dorg.gradle.vfs.watch=false"
JAVA_OPTS: "$GRADLE_OPTS"
build_apk:
...
before_script:
- chmod +x ./gradlew
- ./gradlew --version
script:
...
- export JAVA_OPTS='-Xmx4096m -Xms64m -Dfile.encoding=UTF-8'
- export JAVA_OPTS="$JAVA_OPTS"
- export GRADLE_OPTS="$GRADLE_OPTS"
- ./gradlew assembleRelease --no-daemon --build-cache --configuration-cache
artifacts:
...
I have been at it for a while now, and cannot get it to not do the following:
$ ./gradlew assembleRelease --no-daemon --build-cache --configuration-cache
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to <https://docs.gradle.org/9.2.1/userguide/gradle_daemon.html#sec:disabling_the_daemon> in the Gradle documentation.
Daemon will be stopped at the end of the build
What I have tried already:
β’ I set the org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8 -Dorg.gradle.daemon=false in gradle.properties at root of the project
β’ In gradlew I made DEFAULT_JVM_OPTS=''
β’ I set the GRADLE_OPTS and JAVA_OPTS into various matching configurations
β’ Various combinations of the above, following the https://docs.gradle.org/9.2.1/userguide/gradle_daemon.html#sec:disabling_the_daemon
β’ Consulted various AIs
So far no luck, what am I missing? Any good resources or even templates to consult, aside from the documentation which did not help so far.Laura Kassovic
03/03/2026, 8:10 PM