android build error Could not get unknown property 'android' for project ':open_file' of type org.gradle.api.Project
  • 08-May-2023
Lightrun Team
Author Lightrun Team
android build error Could not get unknown property 'android' for project ':open_file' of type org.gradle.api.Project

android build error Could not get unknown property ‘android’ for project ‘:open_file’ of type org.gradle.api.Project.

Lightrun Team
Lightrun Team

Explanation of the problem

In this technical issue, a problem occurred while configuring the project ‘:open_file’ due to the unavailability of certain artifacts in the configuration ‘:open_file:classpath’. Specifically, the error message indicates that the artifacts “builder-4.0.2.jar” and “bundletool-0.13.2.jar” could not be resolved. The error message lists the locations where the artifacts were searched, but they could not be found. In addition, the project could not recognize the property ‘android’ of the project ‘:open_file’ of type org.gradle.api.Project. As a result, the build process fails even after downloading the missing artifact using the provided link.

The technical stack used in this project includes Flutter, Android toolchain, Android Studio, and VS Code. The Flutter version being used is 1.22.3, with the framework revision of 8874f21e79 and the Dart version 2.10.3. The Android toolchain used has version 29.0.3 of the Android SDK, with platform android-29 and build-tools 29.0.3. Android Studio version 4.0 is being used, and the Java version used is OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01). VS Code version 1.51.1 is also installed, with Flutter extension version 3.16.0. Additionally, a connected device, emulator-5554, with the SDK gphone x86 (mobile) and Android 11 (API 30) is available.

Troubleshooting with the Lightrun Developer Observability Platform

Getting a sense of what’s actually happening inside a live application is a frustrating experience, one that relies mostly on querying and observing whatever logs were written during development.
Lightrun is a Developer Observability Platform, allowing developers to add telemetry to live applications in real-time, on-demand, and right from the IDE.

  • Instantly add logs to, set metrics in, and take snapshots of live applications
  • Insights delivered straight to your IDE or CLI
  • Works where you do: dev, QA, staging, CI/CD, and production

Start for free today

Problem solution for android build error Could not get unknown property ‘android’ for project ‘:open_file’ of type org.gradle.api.Project.

To fix this technical issue, the missing artifacts ‘builder-4.0.2.jar’ and ‘bundletool-0.13.2.jar’ need to be resolved by ensuring that they are present in the correct directory. The location specified in the error message can be checked to confirm the existence of the artifacts in the required directory. In addition, since the project could not recognize the property ‘android’ of the project ‘:open_file’ of type org.gradle.api.Project, it may be helpful to check the project configuration to ensure that it is correct. If necessary, a newer version of the Gradle plugin may need to be installed to support the ‘android’ property. Finally, cleaning the cache, updating Gradle, and repairing Flutter can also help resolve the issue.

Other popular problems with open_file

Problem: Gradle Sync Error

The error message can be seen in Android Studio’s Build panel, indicating that the Gradle sync process has failed. The cause of the error can be varied, ranging from issues with dependencies and library versions to network connectivity problems.


To resolve this error, developers can try to clean and rebuild the project or update the Gradle version. They can also check if there are any issues with the dependencies or network connection.

Problem: Compatibility Issues:

Another common issue with open_file is compatibility issues. The library may not work with certain versions of Android, devices, or other libraries used in the project. This can result in runtime errors or crashes.


To solve this issue, developers can check the minimum and target SDK versions in the project’s build.gradle file, ensure that the correct dependencies and library versions are used, and test the app on different devices and Android versions.

Problem: Build Failed Error

Lastly, developers may encounter build failed errors when using open_file. This can occur when building the project with Gradle or running the app on an emulator or device. The error message may vary, but it can prevent the app from being built or launched.


To resolve this error, developers can try to clean and rebuild the project, update the dependencies, or check if there are any issues with the project’s configurations, such as the AndroidManifest.xml or build.gradle files. They can also check if there are any conflicts with other libraries used in the project.

A brief introduction to open_file

Open_file is a software library that is widely used for file handling and management. It provides a simple interface for opening and accessing various file formats, including images, audio, and video files. This library supports a wide range of file formats, including MP4, AVI, MKV, and others, making it a versatile solution for developers. The library provides a range of methods for opening and accessing files, such as openInputStream and openOutputStream. Additionally, it allows developers to read and write files and perform other file management tasks with ease.

Open_file can be integrated into various programming languages, such as Java and Python, and is available for use on different operating systems, including Windows, Mac, and Linux. This library is widely used in various applications that require file management and handling. For instance, it is used in media players to handle and play various media files. It is also used in image processing applications for opening, manipulating, and saving images in different formats. In addition, it is used in document management systems for opening and managing various document formats. Overall, open_file is a versatile and widely used library for file handling and management.

Most popular use cases for Open_file

  1. Open_file can be used to provide access to files in a Flutter app. The open_file package allows users to open files such as PDFs, images, and videos that are stored locally or remotely. This can be accomplished by using the openFile() function, which takes a file path or a URL as input and opens the file or URL in a new activity.
import 'package:open_file/open_file.dart';

void _openFile(String filePath) async {
  final result = await;
  1. open_file can be used to view and edit files on both Android and iOS platforms. With this package, users can view and edit documents, images, videos, and more from within their Flutter apps. This is made possible by the use of the native platform’s default file viewer, which ensures that files are viewed and edited using the best available tool on the device.
  2. Open_file can be used to support file sharing between different apps. When users want to share a file from a Flutter app to another app, the open_file package can be used to facilitate the process. The package provides the ability to share a file via an Intent on Android and a UIDocumentInteractionController on iOS, allowing users to select the app they wish to use to handle the file. This can be done using the share() function, which takes a file path as input and shares the file with other apps.
import 'package:open_file/open_file.dart';

void _shareFile(String filePath) async {
  await OpenFile.share(filePath);

It’s Really not that Complicated.

You can actually understand what’s going on inside your live applications.

Try Lightrun’s Playground

Lets Talk!

Looking for more information about Lightrun and debugging?
We’d love to hear from you!
Drop us a line and we’ll get back to you shortly.

By submitting this form, I agree to Lightrun’s Privacy Policy and Terms of Use.