Saha
Saha

Reputation: 369

AndroidManifest class referenced applicationName was not found

I have a problem with my Flutter application, when I used ./gradlew build I got this error message:

Error: Class referenced in the manifest, com.example.pet_store.${applicationName}, was not found in the project or the libraries [MissingClass]
          android:name="${applicationName}"
                        ~~~~~~~~~~~~~~~~~~

I used both Android Studio and VSCode. Also Invalidate Cache/Restart didn't work for me. My gradle version is 6.7.1

Running ./gradlew build --debug gives me this error message

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.

How can I solve this?

Upvotes: 1

Views: 1342

Answers (1)

Saha
Saha

Reputation: 369

I downgraded my gradle to 6.6.1 and added these lines to /android/app/build.gradle file:

android{
//...
    lintOptions {
        abortOnError false
    }
}

Then flutter clean, flutter run, ./gradlew clean and finally ./gradlew build everything works fine.

Upvotes: 2

Related Questions