My Maven based project is executing the following command resulting in the error that follows:
Command
/bin/sh -c cd /Users/conor/Repositories/Dev/MyPosLogger/samples/HelloMyPosLogger && /Users/conor/Library/Android/sdk/build-tools/22.0.1/aapt package -f --no-crunch -I /Users/conor/Library/Android/sdk/platforms/android-19/android.jar -M /Users/conor/Repositories/Dev/MyPosLogger/samples/HelloMyPosLogger/target/filtered-manifest/AndroidManifest.xml -S /Users/conor/Repositories/Dev/MyPosLogger/samples/HelloMyPosLogger/src/main/res -S /Users/conor/Repositories/Dev/MyPosLogger/samples/HelloMyPosLogger/target/unpacked-libs/android.support_compatibility-v7-appcompat_apklib_22.0.0/res -m -J /Users/conor/Repositories/Dev/MyPosLogger/samples/HelloMyPosLogger/target/generated-sources/r --output-text-symbols /Users/conor/Repositories/Dev/MyPosLogger/samples/HelloMyPosLogger/target --auto-add-overlay
Error
/Users/conor/Repositories/Dev/MyPosLogger/samples/HelloMyPosLogger/target/unpacked-libs/android.support_compatibility-v7-appcompat_apklib_22.0.0/res/values-v21/styles_base.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
Why is this and how do I fix it please?
I am using Android Maven Plugin v3.8.2
I have faced this error before and i solved it by the followin
Open Android sdk and make sure latest version of support library is installed or not. If not then install it also check compile pi version for your project is latest or not i.e. 21.
2.After installing just mvn clean install.
This will solve the issue.
Related
I'm facing a problem in building my game to apk after I implemented unity google ads plugin. Before adding the plugin the build worked.
The problem is the error mentioned below:
CommandInvokationFailure: Failed to re-package resources.
CommandInvokationFailure: Failed to re-package resources.
C:\Users\Hamid Red\AppData\Local\Android\Sdk\build-tools\29.0.2\aapt.exe package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "C:/Users/Hamid Red/AppData/Local/Android/Sdk\platforms\android-29\android.jar" -F bin/resources.ap_ --extra-packages android.arch.lifecycle:androidx.arch.core:androidx.asynclayoutinflater:androidx.browser:androidx.coordinatorlayout:androidx.core:androidx.cursoradapter:androidx.customview:androidx.documentfile:androidx.drawerlayout:androidx.fragment:androidx.interpolator:androidx.legacy.coreui:androidx.legacy.coreutils:androidx.lifecycle.livedata:androidx.lifecycle.livedata.core:androidx.lifecycle:androidx.lifecycle.viewmodel:androidx.loader:androidx.localbroadcastmanager:androidx.print:androidx.slidingpanelayout:androidx.swiperefreshlayout:androidx.versionedparcelable:androidx.viewpager:android.support.compat:android.support.coreui:android.support.coreutils:android.support.fragment:android.support.mediacompat:android.support.v4:com.google.android.gms.ads.impl:com.google.android.gms.ads_base:com.google.android.gms.ads_identifier:com.google.android.gms.ads:com.google.android.gms.common:com.google.android.gms.gass:com.google.firebase.measurement:com.google.android.gms.measurement_base:com.google.firebase.measurement_impl:com.google.android.gms.measurement.sdk:com.google.android.gms.measurement.sdk.api:com.google.android.gms.stats:com.sglib.easymobile.androidnative:com.google.unity:com.google.unity.ads:com.unity3d.ads -S
Follow the picture and resolve dependencies:
If it still doesn't work then it can be due to outdated android sdk.
https://github.com/unity-plugins/Unity-Admob/issues/70
https://forum.unity.com/threads/solved-still-commandinvokationfailure-failed-to-re-package-resources-after-updating-android-sdk.496425/
Might help you.
I'm getting the following error when I build my APK:
CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\Users\Me\AppData\Local\Android\sdk\build-tools\24.0.0\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/Users/Me/AppData/Local/Android/sdk\platforms\android-24\android.jar" -F bin/resources.ap_ --extra-packages
I wish to integrate "Leaderboards" in my app using Google Play Services. What should I do to fix this?
What I've tried:
Reinstalling the Google Play Services plugin.
Updating SDK: See here. (tell me if I did it properly).
Made sure I have latest versions of "Extras/Android Support Repository" and "Extras/Google Repository".
Installed everything in SDK Manager. See here.
Updating Unity.
Restarting.
Few minor changes.
This absolutely will fix your problem.
Download the google_play_services from this link below :
https://dl-ssl.google.com/android/repository/google_play_services_8298000_r28.zip
Then unzip it.
after unzip copy the file to :
android-sdk/extras/google/google_play_services/
Find version.xml file at the zip file:
android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values/
and copy it to :
Assets/Plugins/Android/res/values/
At unity folder
This is work for me.
To fix this error, you have to copy the version.xml file from
android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values/
into
Assets/Plugins/Android/res/values/
of your Unity project's folder.
I was trying to compile Android project using command line in Windows. When I use aapt to generate R file, it comes out an error as below:
D:\SampleProject\MyApplication>aapt package -f -m -J ./gen -S ./app/src/main/res
-I "D:\ProgramInstall\Android\Android SDK\platforms\android-21\android.jar" -M
./app/src/main/AndroidManifest.xml
.\app\src\main\res\values\styles.xml:4: error: Error retrieving parent for item:
No resource found that matches the given name 'Theme.AppCompat.Light.DarkAction
Bar'.
I've found that the Theme.Appcompact.Light.DarkActionBar is related to the APPcompat_v7 floder while the floder is under in the libs floder, How can I let the complier know where to find the lib it need?
I know its too late or you may have already found the answer also but still posting:
D:\SampleProject\MyApplication>aapt package **--auto-add-overlay** -f -m -J ./gen -S ./app/src/main/res **-S "path_to_prebuilts\prebuilts\devtools\extras\android\support\v7\appcompat\res\"** -I "D:\ProgramInstall\Android\Android SDK\platforms\android-21\android.jar" -M ./app/src/main/AndroidManifest.xml
I'm trying to change the package name of my app but I'm seeing this gradle crash when building.
What went wrong:
Execution failed for task ':main:MyApp:processDebugResources'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Applications/Android Studio.app/sdk/build-tools/19.0.3/aapt package -f --no-crunch -I /Applications/Android Studio.app/sdk/platforms/android-19/android.jar -M /Users//Documents/workspace/android/application/main/MyApp/build/manifests/debug/AndroidManifest.xml -S /Users//Documents/workspace/android/application/main/MyApp/build/res/all/debug -A /Users//Documents/workspace/android/application/main/MyApp/build/assets/debug -m -J /Users//Documents/workspace/android/application/main/MyApp/build/source/r/debug -F /Users//Documents/workspace/android/application/main/MyApp/build/libs/MyApp-debug.ap_ -G /Users//Documents/workspace/android/application/main/MyApp/build/proguard/debug/aapt_rules.txt --debug-mode --custom-package com.app.myapp --output-text-symbols /Users//Documents/workspace/android/application/main/MyApp/build/symbols/debug
Error Code:
138
Correct way to change package name is
1) Go to manifest click on package="packagename" and press Shift+F6. Do refactor with all changes in all .
2) Click Do refactor in build config if that turns up
3) Go to package in src/main/java
4) Right click -> refactor -> move and click move to another package. Choose name and target directory.
5) It will create new package with files.
6) Delete old empty package
7) Clean project, restart android studio and clean once again
8) If you go to build/generated/source/r/debug you will see package name has changed.
I tried to run rake run:android the follwing occurs, kindly assist me.
AndroidManifest change file [C:/Users/giridhran/workspace/myfirst/bin/libs/relea
se/arm-linux-androideabi/4.4.3/extensions/AndroidManifest.xml] from native exten
sion not found !
delete original manifest
Manifest updated by extension saved!
EXT: add additional files to project before build
PWD: C:/RhoStudio/ruby/lib/ruby/gems/1.8/gems/rhodes-3.3.2
CMD: D:/installer/android-sdk_r11-windows/android-sdk-windows/platform-tools/aap
t.exe package -f -M C:/Users/giridhran/workspace/myfirst/bin/tmp/AndroidManifest
.xml -S C:/Users/giridhran/workspace/myfirst/bin/tmp/res -A C:/RhoStudio/ruby/li
b/ruby/gems/1.8/gems/rhodes-3.3.2/platform/android/Rhodes/assets -I D:/installer
/android-sdk_r11-windows/android-sdk-windows/platforms/android-8/android.jar -J
C:/Users/giridhran/workspace/myfirst/bin/tmp
C:\Users\giridhran\workspace\myfirst\bin\tmp\AndroidManifest.xml:30: error: No r
esource identifier found for attribute 'xlargeScreens' in package 'android'
Error in AAPT
Before running rake run:android command, please ensure that:
you have set the path of java-bin folder.
you have set the path of Android SDK & NDK.
check the android version in build.xml file.