Search code examples
android-studioandroid-fragmentsandroid-activitybuild-toolsandroid-studio-4.0

Android Studio 4.0 file > New > Activity OR Fragment not working


I have android studio 4.0 installed & I am unable to create new activity OR fragment from File > New menu.

All that happens is just a gradle build & files don't show up after I click the Finish button.

Following is the system environment.

Studio Version: 4.0
SDK build tool: 30
Gradle wrapper: 6.1.1
OS: macOS Catalina (10.15.2)
Machine: MacBook Air (2017 

I am using an android navigation UI version: 2.2.2 and also tried to create new activity/fragment from navigation file using New Destination still no result.

Let me know if any other information is required.


Solution

  • Please open your app build.gradle file and delete debug config from signingConfigs and try again:

     signingConfigs {
       // delete this entire debug block 
       debug {
            storeFile file('file path')
            storePassword 'password'
            keyPassword 'password'
            keyAlias = 'password'
        }
    }