I am new to AndroidStudio AND Gradle.
I imported a project from eclipse, created a module, and tried to run the project, but I got this error:
Androi
In my case, my android project got corrupted and some of the files were showing characters, binary numbers, etc. I tried the following solutions
But none of the above solutions worked for me.
Then I just deleted the cache folder under C:\Users\username\.AndroidStudio3.6\system
and all the invalid characters disappeared and the actual contents of all the files were displayed. This solution worked for me.
1.Check whether the manifest file is there or not.
2.If it is there, check whether the package name is correct or not..
3.If you project has small number of classes, then you create new project in android and then copy paste your code from eclipse. It will be simple. But it is recommended only for small project.
And finally click 'Sync' in the Gradle file. Followed by Rebuilding the project will do a trick.
Every Android project needs a file called AndroidManifest.xml
to tell Android about itself. Either your project doesn't have one, or it's not in the place that Android Studio expects it to be. Try to find it, and move it to the root folder of the project.
Go to C drive click User then select your android studio folder then select System find Cache folder and delete this folder before doing this close your android Studio.It will surely work.
In my case the Manifest file seemed to be corrupted or maybe its meta data. Trying to open it in Android Studio will show some characters that you see when opening a binary file with a text editor, for ex. Anyway, my project is under Git, so I just deleted it and restored it back, problem fixed.
Click on File > Invalidate Cache/Restart, and that's it. Your project should start working.