Processing manifest failed android studio - android-studio

I have an issue in android studio where I run the project and it kicks up an error. There isn't really much else I know, but here's the full error:
Android resource linking failed
Output: C:\Users\John\AndroidStudioProjects\MyApplication\app\build\intermediates\instant_run_merged_manifests\debug\processDebugManifest\instant-run\AndroidManifest.xml:44: error: resource string/google_maps_key (aka com.example.john.myapplication:string/google_maps_key) not found.
error: failed processing manifest.
Command: C:\Users\John\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\400d656be4460564aa03c7fb5fa4f8bf\aapt2-3.2.0-4818971-windows\aapt2.exe link -I\
C:\Users\John\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
-I\
C:\Users\John\AndroidStudioProjects\MyApplication\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
--manifest\
C:\Users\John\AndroidStudioProjects\MyApplication\app\build\intermediates\instant_run_merged_manifests\debug\processDebugManifest\instant-run\AndroidManifest.xml\
-o\
C:\Users\John\AndroidStudioProjects\MyApplication\app\build\intermediates\instant_run_main_apk_resources\debug\instantRunMainApkResourcesDebug\out\main_resources\resources_ap\
--auto-add-overlay\
-0\
apk\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
It occurred here.
Please help!

You probably have something like this in your Android Manifest:
meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key"
You need to add that string to your app/src/main/res/values/strings.xml file:
<resources>
<string name="google_maps_key"> COPY THE VALUE FROM GOOGLE CLOUD PLATFORM </string>
</resources>
You can follow this tutorial to get the API key.

Related

Can't run Flutter app error "FAILURE: Build failed with an exception."

This app is from Github
"https://github.com/wiltonribeiro/grocery_shop_flutter"
I was wondering if someone else is able to run it because i get some execution errors and I cant fix them.
I would appreciate it if someone can fix the issue
Cheers!
Edit: I appreciate your responses
the error looks like this:
"
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Android resource linking failed
Output: O:\grocery_shop_flutterbait\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:86: error: resource android:attr/fontVariationSettings not found.
O:\grocery_shop_flutterbait\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:87: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\arsla.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\6eab767dc8c1fd40d868c7361b7d30e9\aapt2-3.2.1-4818971-windows\aapt2.exe link -I
C:\Users\arsla\AppData\Local\Android\sdk\platforms\android-27\android.jar
--manifest
O:\grocery_shop_flutterbait\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
-o
O:\grocery_shop_flutterbait\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
-R
#O:\grocery_shop_flutterbait\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
O:\grocery_shop_flutterbait\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
--custom-package
com.example.groceryshopflutter
-0
apk
--output-text-symbols
O:\grocery_shop_flutterbait\build\app\intermediates\symbols\debug\R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\arsla.gradle\caches\transforms-1\files-1.1\core-1.1.0.aar\18619ad8df18189ffa8d36e63947ac33\res\values\values.xml:174:5-210:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\arsla.gradle\caches\transforms-1\files-1.1\core-1.1.0.aar\18619ad8df18189ffa8d36e63947ac33\res\values\values.xml:174:5-210:25: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\arsla.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\6eab767dc8c1fd40d868c7361b7d30e9\aapt2-3.2.1-4818971-windows\aapt2.exe link -I
C:\Users\arsla\AppData\Local\Android\sdk\platforms\android-27\android.jar
--manifest
O:\grocery_shop_flutterbait\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml
-o
O:\grocery_shop_flutterbait\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_
-R
#O:\grocery_shop_flutterbait\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
O:\grocery_shop_flutterbait\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r
--custom-package
com.example.groceryshopflutter
-0
apk
--output-text-symbols
O:\grocery_shop_flutterbait\build\app\intermediates\symbols\debug\R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
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 19s
Exception: Gradle task assembleDebug failed with exit code 1
""
I tried to compile it to android and i could fix this error by changing compileSdkVersion to 28
However the solution is applicable if you follow the instruction on https://github.com/wiltonribeiro/grocery_shop_flutter
Yes, it works perfectly fine in the latest version.product picture (only for ios phone running).
No need to worry>>> Only on terminal, It still tells an error message "Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration"
The output looks like this!!!

Failure building Gradle

I tried to a create new project through Google maps activity but my android studio keeps through an exception whenever I try build the gradle. Please any solution colleagues. PC... haven't written any code yet.
Here is the gradle message ....
Error:error: resource android:attr/fontVariationSettings not found.
Error:error: resource android:attr/ttcIndex not found.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

Why does AS wants compile project after flutter update

FAILURE: Build failed with an exception.
Just updated flutter to 1.5.4-hotfix.2
and now my project doesnt compile but my co-worker had no problems with same version
CONSOLE OUTPUT
Launching lib\main.dart on SM G955F in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
Output: D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:906: error: resource android:attr/fontVariationSettings not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:906: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\78f68b33382372bc3dc84b96fd530582\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Janer\AppData\Local\Android\sdk\platforms\android-27\android.jar\
--manifest\
D:\Desktop\asdPrj\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
D:\Desktop\asdPrj\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#D:\Desktop\asdPrj\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
D:\Desktop\asdPrj\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
ga.aninet\
-0\
apk\
--output-text-symbols\
D:\Desktop\asdPrj\build\app\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\appcompat-1.0.0.aar\9a8530dc700588f390ca440a65237576\res\values-v28\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
D:\Desktop\asdPrj\build\app\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.
C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\becf871373d3300ffd53f5291be852df\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\becf871373d3300ffd53f5291be852df\res\values\values.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:\Users\Janer\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\78f68b33382372bc3dc84b96fd530582\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Janer\AppData\Local\Android\sdk\platforms\android-27\android.jar\
--manifest\
D:\Desktop\asdPrj\build\app\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
D:\Desktop\asdPrj\build\app\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#D:\Desktop\asdPrj\build\app\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
D:\Desktop\asdPrj\build\app\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
ga.aninet\
-0\
apk\
--output-text-symbols\
D:\Desktop\asdPrj\build\app\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
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 gradle url
BUILD FAILED in 5s
Finished with error: Gradle task assembleDebug failed with exit code 1
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See [googleHref][2] for more information on the problem and how to fix it.
Execute the flutter clean command in your project, to erase everything in cache of previous compilations

I am getting the following errors in Android Studio "Android Resource Linking Failed"

Android resource linking failed
Output: C:\Users\NASIR CHANGEZI\AndroidStudioProjects\MyFirstProject\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml:25: error: resource style/AppTheme (aka com.example.nasirchangezi.myfirstproject:style/AppTheme) not found.
error: failed processing manifest.
Command: C:\Users\NASIR CHANGEZI\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\7c69ee26222ec96ad56e657c99f59917\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\NASIR CHANGEZI\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
--manifest\
C:\Users\NASIR CHANGEZI\AndroidStudioProjects\MyFirstProject\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\
-o\
C:\Users\NASIR CHANGEZI\AndroidStudioProjects\MyFirstProject\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\
-R\
#C:\Users\NASIR CHANGEZI\AndroidStudioProjects\MyFirstProject\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\NASIR CHANGEZI\AndroidStudioProjects\MyFirstProject\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\
--custom-package\
com.example.nasirchangezi.myfirstproject\
-0\
apk\
--output-text-symbols\
C:\Users\NASIR CHANGEZI\AndroidStudioProjects\MyFirstProject\app\build\intermediates\symbols\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
In your android manifest you are referencing a style "AppTheme". Check your res/values/.xml files if they contain this resource, if not, add it.

Android Studio: Error after deleting file

I got this error:
Error:Execution failed for task ':app:generateDebugBuildConfig'. > java.io.IOException: Could not delete path 'C:\Users\Guest Account\Documents\COLLEGE\FYP\7. Iteration 4\fridge iteration 4\app\build\generated\source\buildConfig\debug\com'.
and saw 'could not delete path' so I decided to follow the path and delete the path. When I reran the app I got seven new errors:
Error:Execution failed for task ':app:processDebugResources'.
Failed to execute aapt
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:failed linking file resources.
Error:attribute 'com.virtual.fridge:layout_behavior' not found.
Error:error: attribute 'com.virtual.fridge:layout_behavior' not found.
In my even log I have two new messages:
* daemon not running; starting now at tcp:5037
21:10 * daemon started successfully
I am going to presume this is down to deleting that file.. is there anything I can do? Really new to android studio so I appreciate any help. Please tell me what other information I shoudl provide
I cleaned the project and built it and it worked

Resources