Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle build error after updating Android Studio to 2.2 Preview 3

After updating AS from 2.2 Preview 2 to 2.2 Preview 3, and updating an AS project to the new format, the follow error is encountered when trying to build & run the app:

Error:A problem was found with the configuration of task ':app:generateDebugInstantRunAppInfo'.

File '\app\build\intermediates\bundles\debug\instant-run\AndroidManifest.xml' specified for property 'mergedManifest' does not exist.

However the above message just points to failure in the prior build processes, where google-services.json isn't properly imported, and the following AndroidManifest entry would produce symbol 'google_play_services_version' not found error after the update:

<meta-data
    android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />

Additionally all the activity entries and most service entries in AndroidManifest have this error: 'xxxService' is not assignable to 'android.app.Activity/Service'

Clean Project & Build Project doesn't help, any ideas on how to fix this?

like image 887
Kai Avatar asked Jun 09 '16 03:06

Kai


People also ask

Why does Gradle build fail?

When Gradle is unable to communicate with the Gradle daemon process, the build will immediately fail with a message similar to this: $ gradle help Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details FAILURE: Build failed with an exception.

What is the latest version of Gradle in Android Studio?

7.1.2 (February 2022) Android Gradle Plugin 7.1.


1 Answers

Disable Instant Run. Build and launch app. Stop app. Enable Instant Run. Build and launch app.

I noticed the same error after I took the preview 3 update. The above steps corrected the issue for me.

like image 92
Brian Nacey Avatar answered Oct 20 '22 20:10

Brian Nacey