i have an error while building my project in android

UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:162
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:83
UnityEditor.HostView:OnGUI()

Building to the Assets folder is not allowed.

how i fix it my unity verson is 2017.1

The error message looks fairly self-explanatory to me.

It says that you’re trying to build within the Assets folder. That’s where you put the things that go into the build… do you want the build to be put into itself…?

When the dialog asks you to choose a location and filename for your APK, you need to pick a folder that’s outside the Assets folder.