Android studio compile error Content is not allowed in prolog
in "res" directory I create new "database" directory
That is not supported. You cannot invent new resource directories.
Please put the files in res/raw/
(and use via getResources().openRawResource()
) or assets/
(and use via getAssets().open()
).
Content is not allowed in prolog. in android studio
I was using the latest version of gradle classpath dependency
classpath "com.android.tools.build:gradle:4.2.1"
I changed it to
classpath "com.android.tools.build:gradle:4.2.0"
Magically, all errors are gone.
Content is not allowed in prolog during Gradle build
After a lot of struggle and searching online, i finally solve the problem.
I deleted all the cached folders in gradle and when i build my new project. It work like magic.
Thanks @ישו אוהב אותך for reply and trying to help me.
Build error :colors.xml:1:1: Error: Content is not allowed in prolog
Sounds like you've hit a known issue that has affected a lot of people on Windows. It happens if your system is shutdown suddenly or Android Studio is killed. The team is aware of this issue and is working on identifying the cause.
You can follow the progress on https://issuetracker.google.com/119638289
Content is not allowed in prolog. Getting this error while building my android project
I got this error because version number of my firebase dependencies are not same. I fix this error by changing the version number.
Android Studio, Gradle Errors. Content not allowed in Prolog
You could try clearing your gradle cache: gradle clean --refresh-dependencies
and delete the contents of ~/.gradle/caches
. Should help.
For more details, see https://stackoverflow.com/a/22670684/1243753
Related Topics
Android: Using Simplecursoradapter to Get Data from Database to Listview
Gradle Error: Minimum Supported Gradle Version Is 3.3. Current Version Is 3.2
Checkselfpermission Method Is Not Working in Targetsdkversion 22
How to Run an Android App in Background
App Not Run in Visual Studio Emulator for Android in Visual Studio 2015
How to Store an Integer Array in Sharedpreferences
Override Android Backbutton Behavior Only Works on the First Page with Phonegap
Progressdialog Not Shown When Asynctask.Get() Called
How to Perform Collection Group Query Using Document Id in Cloud Firestore
Android:Maximum Allowed Width & Height of Bitmap
Ongloballayoutlistener: Deprecation and Compatibility
My Current Location Always Returns Null. How to Fix This
Avoid Reloading Activity with Asynctask on Orientation Change in Android
How to Change the Package Name of an Android App on Google Play
Android Kitkat Securityexception When Trying to Read from Mediastore
Simple Way to Do Dynamic But Square Layout
Buildconfig.Debug Always False When Building Library Projects with Gradle