Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with Gradle task assembleDebug after installing flutter_native_splash on Ubuntu (Android emulator) #768

Open
RasorDev opened this issue Feb 4, 2025 · 0 comments

Comments

@RasorDev
Copy link

RasorDev commented Feb 4, 2025

Every time I install the flutter_native_splash package in my Flutter project on Ubuntu (Android emulator), I encounter a build failure with the following error:

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Support for Android x86 targets will be removed in the next stable release after 3.27. See https://github.com/flutter/flutter/issues/157543 for details.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':flutter_native_splash'.
> Could not resolve all files for configuration ':flutter_native_splash:classpath'.
   > Could not find gradle-7.1.2.jar (com.android.tools.build:gradle:7.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.1.2/gradle-7.1.2.jar
   > Could not find builder-7.1.2.jar (com.android.tools.build:builder:7.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/7.1.2/builder-7.1.2.jar
   > Could not find sdk-common-30.1.2.jar (com.android.tools:sdk-common:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/30.1.2/sdk-common-30.1.2.jar
   > Could not find sdklib-30.1.2.jar (com.android.tools:sdklib:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/30.1.2/sdklib-30.1.2.jar
   > Could not find repository-30.1.2.jar (com.android.tools:repository:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/repository/30.1.2/repository-30.1.2.jar
   > Could not find gradle-api-7.1.2.jar (com.android.tools.build:gradle-api:7.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/7.1.2/gradle-api-7.1.2.jar
   > Could not find builder-test-api-7.1.2.jar (com.android.tools.build:builder-test-api:7.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/7.1.2/builder-test-api-7.1.2.jar
   > Could not find ddmlib-30.1.2.jar (com.android.tools.ddms:ddmlib:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/30.1.2/ddmlib-30.1.2.jar
   > Could not find aaptcompiler-7.1.2.jar (com.android.tools.build:aaptcompiler:7.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/aaptcompiler/7.1.2/aaptcompiler-7.1.2.jar
   > Could not find bundletool-1.8.0.jar (com.android.tools.build:bundletool:1.8.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/1.8.0/bundletool-1.8.0.jar
   > Could not find aapt2-proto-7.1.2-7984345.jar (com.android.tools.build:aapt2-proto:7.1.2-7984345).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2-proto/7.1.2-7984345/aapt2-proto-7.1.2-7984345.jar
   > Could not find crash-30.1.2.jar (com.android.tools.analytics-library:crash:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/crash/30.1.2/crash-30.1.2.jar
   > Could not find tracker-30.1.2.jar (com.android.tools.analytics-library:tracker:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/30.1.2/tracker-30.1.2.jar
   > Could not find shared-30.1.2.jar (com.android.tools.analytics-library:shared:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/30.1.2/shared-30.1.2.jar
   > Could not find databinding-compiler-common-7.1.2.jar (androidx.databinding:databinding-compiler-common:7.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-compiler-common/7.1.2/databinding-compiler-common-7.1.2.jar
   > Could not find databinding-common-7.1.2.jar (androidx.databinding:databinding-common:7.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-common/7.1.2/databinding-common-7.1.2.jar
   > Could not find baseLibrary-7.1.2.jar (com.android.databinding:baseLibrary:7.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/7.1.2/baseLibrary-7.1.2.jar
   > Could not find layoutlib-api-30.1.2.jar (com.android.tools.layoutlib:layoutlib-api:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/30.1.2/layoutlib-api-30.1.2.jar
   > Could not find android-device-provider-ddmlib-proto-30.1.2.jar (com.android.tools.utp:android-device-provider-ddmlib-proto:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-device-provider-ddmlib-proto/30.1.2/android-device-provider-ddmlib-proto-30.1.2.jar
   > Could not find android-device-provider-gradle-proto-30.1.2.jar (com.android.tools.utp:android-device-provider-gradle-proto:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-device-provider-gradle-proto/30.1.2/android-device-provider-gradle-proto-30.1.2.jar
   > Could not find android-test-plugin-host-additional-test-output-proto-30.1.2.jar (com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-host-additional-test-output-proto/30.1.2/android-test-plugin-host-additional-test-output-proto-30.1.2.jar
   > Could not find android-test-plugin-host-coverage-proto-30.1.2.jar (com.android.tools.utp:android-test-plugin-host-coverage-proto:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-host-coverage-proto/30.1.2/android-test-plugin-host-coverage-proto-30.1.2.jar
   > Could not find android-test-plugin-host-retention-proto-30.1.2.jar (com.android.tools.utp:android-test-plugin-host-retention-proto:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-host-retention-proto/30.1.2/android-test-plugin-host-retention-proto-30.1.2.jar
   > Could not find android-test-plugin-result-listener-gradle-proto-30.1.2.jar (com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-result-listener-gradle-proto/30.1.2/android-test-plugin-result-listener-gradle-proto-30.1.2.jar
   > Could not find builder-model-7.1.2.jar (com.android.tools.build:builder-model:7.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/7.1.2/builder-model-7.1.2.jar
   > Could not find dvlib-30.1.2.jar (com.android.tools:dvlib:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/30.1.2/dvlib-30.1.2.jar
   > Could not find common-30.1.2.jar (com.android.tools:common:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/common/30.1.2/common-30.1.2.jar
   > Could not find jetifier-processor-1.0.0-beta09.jar (com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-processor/1.0.0-beta09/jetifier-processor-1.0.0-beta09.jar
   > Could not find apkzlib-7.1.2.jar (com.android.tools.build:apkzlib:7.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/7.1.2/apkzlib-7.1.2.jar
   > Could not find jetifier-core-1.0.0-beta09.jar (com.android.tools.build.jetifier:jetifier-core:1.0.0-beta09).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-core/1.0.0-beta09/jetifier-core-1.0.0-beta09.jar
   > Could not find protos-30.1.2.jar (com.android.tools.analytics-library:protos:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/30.1.2/protos-30.1.2.jar
   > Could not find signflinger-7.1.2.jar (com.android:signflinger:7.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/signflinger/7.1.2/signflinger-7.1.2.jar
   > Could not find zipflinger-7.1.2.jar (com.android:zipflinger:7.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/zipflinger/7.1.2/zipflinger-7.1.2.jar
   > Could not find annotations-30.1.2.jar (com.android.tools:annotations:30.1.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/annotations/30.1.2/annotations-30.1.2.jar
> Failed to notify project evaluation listener.
   > Could not get unknown property 'android' for project ':flutter_native_splash' of type org.gradle.api.Project.
   > Could not get unknown property 'android' for project ':flutter_native_splash' of type org.gradle.api.Project.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 2m 10s
Error: Gradle task assembleDebug failed with exit code 1

Exited (1).

I have not written any code related to the package yet. Simply installing it causes this error. I have tried updating my Flutter SDK from version 3.24 to 3.27, but the issue persists. Internet connectivity is not the problem, as I have a stable connection.

Configuration:
Here is the flutter_native_splash section of my pubspec.yaml:

dependencies:
  flutter:
    sdk: flutter
    
  cupertino_icons: ^1.0.8
  flutter_native_splash: ^2.4.4

Device:

Device: Android Emulator

OS: Ubuntu

Steps to Reproduce:

  1. Add flutter_native_splash: ^2.4.4 to the pubspec.yaml file.
  2. Run flutter pub get.
  3. Run flutter run on an Android emulator.
  4. Observe the build failure with the Gradle error.

Expected Behavior:
The project should build successfully after installing the flutter_native_splash package.

Actual Behavior:
The build fails with a Gradle error (assembleDebug failed with exit code 1).

Additional Context:

Flutter SDK version: 3.27.0

Operating System: Ubuntu

Android Emulator used for testing

No custom code related to flutter_native_splash has been added yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant