I am developing an flutter e-commerce app for both Android and IOS users. When I run my code, its shows an resource error, I couldn't find the answers.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\JEYASRI.A\AndroidStudioProjects\flutter_foodapp\build\file_picker\intermediates\library_manifest\debug\AndroidManifest.xml:9:5-15:15: AAPT: error: unexpected element <queries> found in <manifest>.
* 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 47s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin cloud_firestore...
Running Gradle task 'assembleAarRelease'...
Exception: The plugin cloud_firestore could not be built due to the issue above.```
Please note that you are getting the following error:
AAPT: error: unexpected element <queries> found in <manifest>.
The error is stating that the element is not being recognized by Android Gradle Plugin.
Android 11 introduced <queries> as a manifest element and older versions of the Android Gradle Plugin do not have this element.
So it could be that you are using an Android Gradle Plugin which does not allow the element.
There are some series of patch versions released by Google in order to fix this error (3.3.3, 3.4.3, 3.5.4, 3.6.4 and 4.0.1).
So please upgrade your build gradle version to one from the above list.
Android Studio 4.1 or higher, with a matching
Android Gradle Plugin (e.g 4.1.* series) does recognize manifest element so they don't face these types of errors.
Have a look into the Android Developers Blog post.
Related
Android build failed:
Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
**any solution? **
the same as in this forum but I also haven't found the answer
https://github.com/expo/eas-cli/issues/1496
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the gradle.properties file or use the new publishing DSL.
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
try
expo doctor
expo doctor --fix-dependencies
but not fixed
I'm trying to build a React Native application using Expo and rnmapbox/maps module, which includes some custom native code.
Up until now, I could build the application without any problems, for Android at least, which is my target platform. But suddenly, it stopped working and the following error log is displayed:
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin class 'org.gradle.api.plugins.BasePlugin'.
> Could not find method maven() for arguments [build_1quotit9ccucu377qnhf7kv5h$_run_closure1$_closure3$_closure5#4a87f9f7] on configuration ':app:archives' of type org.gradle.api.in
ternal.artifacts.configurations.DefaultConfiguration.
What is the problem and how can I possibly fix it?
The problem appears to be with Mapbox. We are experiencing the same error as you on our Android builds under eas build. We just removed the rnmapbox/maps dependency and commented out all the relevant code and our builds are passing.
I added the "image": "latest" field to eas.json configuration and it seemed to fix the problem.
Apparently, there was a bug with older versions.
I am setting up my environment to start developing react native apps. I keep getting the following error:
PS C:\map\development\learnreact\react-native\helloworld> react-native
run-android Starting JS server... Building and installing the app on
the device (cd android && gradlew.bat installDebug)...
Configure project :app Observed package id 'platform-tools' in inconsistent location
'C:\Users\bheka\AppData\Local\Android\Sdk\platform-tools' (Expected
'C:\Users\bheka\AppData\Local\Android\Sdk\platform-tools\platform-tools')
Checking the license for package Android SDK Build-Tools 27.0.3 in
C:\Users\bheka\AppData\Local\Android\Sdk\platform-tools\licenses
Warning: License for package Android SDK Build-Tools 27.0.3 not
accepted. Checking the license for package Android SDK Platform 26 in
C:\Users\bheka\AppData\Local\Android\Sdk\platform-tools\licenses
Warning: License for package Android SDK Platform 26 not accepted.
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':app'.
Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-26 Android SDK Platform 26
build-tools;27.0.3 Android SDK Build-Tools 27.0.3 To build this project, accept the SDK license agreements and install the missing
components using the Android Studio SDK Manager. Alternatively, to
transfer the license agreements from one workstation to another, see
http://d.android.com/r/studio-ui/export-licenses.html Using Android
SDK: C:\Users\bheka\AppData\Local\Android\Sdk\platform-tools
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 2s Could not install the app on the device, read the
error above for details. Make sure you have an Android emulator
running or a device connected and have set up your Android development
environment:
https://facebook.github.io/react-native/docs/getting-started.html
I have accepted licenses using .\sdkmanager --licenses but no luck. I have reinstalled the sdk using the sdk manager in android studio with no luck. Anyone know what I should do?
Make sure the sdkbuildtools used by Android Studio and your emulator are the same as the ones in your build.gradle file in your project folder. If they do not match then either change the build.gradle file to use the installed sdk version. What probably happened is you have sdk 27 used by your android studio and your rn project tried to build it using sdk 26. Accepting the license will not change anything because while it's accepted it is still not used by your emulator and you Android Studio.
Hope that helps!
I had similar issue and was resolved by fixing environment variable, ANDROID_SDK_ROOT. It was previously pointing to .../sdk/platform-tools/ and later worked by changing it to .../sdk
I am experiencing a strange issue with Flutter development and IntelliJ IDEA. I am developing a flutter application with IntelliJ IDEA 2017 1.4 Build number IC-171.4694.23, I am not able to run application on connected Android device, when I run the application, it shows a background process running "Running gradle assembleDebug... " and then the process stops, nothing happens although I was able to run and debug it earlier.
Solution tried,
Disabling/ enabling adb plugin.
Disabling/ enabling developer options and usb debugging.
Re-installing flutter.
I tried with android emulator also, same thing happens. So I think the problem is not with the device. Any help is appreciated.
Update:
This issue happens when I add image_picker plugin to my pubspec.yaml.
dependencies:
flutter:
sdk: flutter
image_picker:
Is flutter run failing with the following error?
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find com.github.esafirm.android-image-picker:imagepicker:1.5.0.
Required by:
project :app > project :image_picker
> Could not get unknown property 'compileDebugJavaWithJavac' for project ':app' of type org.gradle.api.Project.
If so, you can fix this issue by modifying your build.gradle as described in the image_picker documentation.
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" } // add this line
}
}
I am trying to build an android app in react native. I have followed the official guidelines and downloaded genymotion and created a new project in react native. How do I open my project in genymotion?
I am getting the following error in my terminal
FAILURE: Build failed with an exception.
Where:
Build file '/Users/adamkatz/Projects/testAndroid/android/app/build.gradle' line: 69
What went wrong:
A problem occurred evaluating project ':app'.
SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 6.504 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
when i added the following
export ANDROID_HOME=/usr/local/opt/android-sdk
i get the following error message
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
failed to find Build Tools revision 23.0.1
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.735 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
You must define ANDROID_HOME I copied the relevant parts from the React Native setup guide below and link below that.
On Mac, add this to your ~/.bashrc, ~/.bash_profile or whatever your shell uses:
If you installed the SDK via Homebrew, otherwise ~/Library/Android/sdk
export ANDROID_HOME=/usr/local/opt/android-sdk
On Linux, add this to your ~/.bashrc, ~/.bash_profile or whatever your shell uses:
export ANDROID_HOME=<path_where_you_unpacked_android_sdk>
On Windows, go to Control Panel -> System and Security -> System -> Change settings -> Advanced -> Environment variables -> New
https://facebook.github.io/react-native/docs/android-setup.html#define-the-android-home-environment-variable
Add a properties file called local.properties in your android project directory (e.g. open your project named as xyz and add this file) and add:
sdk.dir=C\:\\Users\\jeey\\AppData\\Local\\Android\\Sdk
in the file and save it.
Re-run your project.
It seems you have no build tool version 23.0.1 installed in your pc. Lunch your sdk manager and install the specified version.
For more detail.
Go through setting up React native to use with Genny motion here
Android Setup - React Native