diff --git a/packages/flutter_tools/lib/src/application_package.dart b/packages/flutter_tools/lib/src/application_package.dart index b5dc498c8a..0ee8d15524 100644 --- a/packages/flutter_tools/lib/src/application_package.dart +++ b/packages/flutter_tools/lib/src/application_package.dart @@ -82,8 +82,9 @@ class AndroidApk extends ApplicationPackage { String apkPath; if (isProjectUsingGradle()) { - manifestPath = gradleManifestPath; - apkPath = gradleAppOut; + // Grab information from the .apk. The gradle build script might alter the + // application Id, so we need to look at what was actually built. + return new AndroidApk.fromApk(gradleAppOut); } else { manifestPath = fs.path.join('android', 'AndroidManifest.xml'); apkPath = fs.path.join(getAndroidBuildDirectory(), 'app.apk');