Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

387
Views
Entry name 'res/color/material_on_surface_disabled.xml' collided

I just created a signed apk after which, I added two files to my project- my_web_activity.xml and MyWebActivity.kt. After compiling the code, I got the error-"Entry name 'res/color/material_on_surface_disabled.xml' collided" Nothing else was specified.

my_web_activity.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_height="match_parent">

    <com.google.android.gms.ads.AdView
        android:id="@+id/adView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="false"
        app:adSize="BANNER"
        app:adUnitId="ca-app-pub-3940256099942544/6300978111"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent" />

    <WebView
        android:id="@+id/my_web_view"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginBottom="1dp"
        app:layout_constraintBottom_toTopOf="@+id/adView"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
```

MyWebActivity.kt
```
package com.albertjokelin.revise

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.google.android.gms.ads.AdRequest
import com.google.android.gms.ads.AdView
import com.google.android.gms.ads.MobileAds

class MyWebActivity : AppCompatActivity() {

    lateinit var mAdView: AdView

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        setContentView(R.layout.my_web_activity)

        // Google Ad view
        MobileAds.initialize(this)
        mAdView = findViewById(R.id.adView)
        val adRequest: AdRequest = AdRequest.Builder().build()
        mAdView.loadAd(adRequest)
    }

}
```

Edit: I ended up rebuilding the whole project from scratch after trying everything available at that time. So I don't know which solution works. Cheers!
over 4 years ago · Hanz Gallego
6 answers
Answer question

0

I have got this problem when I made an update in a splash screen and a quick solution is

  1. Delete your build folder from android/app/build or yourProjectFoler/build
  2. Delete your release folder from android/app/release or yourProjectFoler/release
  3. Last step from android studio goto => Build > Rebuild Project

Try now! I hope it will work...

over 4 years ago · Hanz Gallego Report

0

Go To Build > Clean Project

over 4 years ago · Hanz Gallego Report

0

Tried INVALIDATE CACHES AND RESTART and works perfect. The main reason is android studio tries to update the build index but is not able to access it !

over 4 years ago · Hanz Gallego Report

0

Delete your build folder in the project hierarchy & the release/debug folder in the app hierarchy,then rebuild your project, it worked for me that way.

over 4 years ago · Hanz Gallego Report

0

don't delete anything just turn off android studio than turn on then make clean and rebuilt to your project and every thing will be good

over 4 years ago · Hanz Gallego Report

0

I tried Build -> Clean Project and File -> Invalidate cache too.

Nothing worked.

Only thing that worked for me was deleting the previous apk that was generated

Which is in android/app/debug/app-debug.apk

over 4 years ago · Hanz Gallego Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!