I have migrated my project to android x and I need to create Apk of the project through android studio Build>>Build Bundle(s) /APK(s)>>Build Apk(s). But when I do this it gives me the following error as in the screen shot below: enter image description here
But when I comment out the highlighted section in the below build.gradle file as shown in picture below build is created by going through Build>>Build Bundle(s) /APK(s)>>Build Apk(s) process enter image description here
I have tried every solution on internet eg invalidate caches and restart, clean project and using androidComponent{ instead of android.applicationVariants.all {
Any help would be appreciated orany work around this situation.
Thanks in advance :)
CodePudding user response:
Delete the apks present in the path which is causing the IOException
. Then generate a signed apk. Your problem should be solved.
CodePudding user response:
I think you have not updated your app for a long time.
Syntax of build gradle files has been changed
Create an new app and copy their build gradle syntax or check someone others app
source code