Hi Everyone, im struggling with this since yesterday and i cannot find any workoarround.
im having the following error when trying to make a build
I’ve tried changing the version of my android sdk, and modifying the androidmanifest. but i cant find a solution.
Resource Dirs:
Including resources from package: C:\Users\carlo\AppData\Local\Android\sdk\platforms\android-24\android.jar
applyFileOverlay for drawable
applyFileOverlay for layout
applyFileOverlay for anim
applyFileOverlay for animator
applyFileOverlay for interpolator
applyFileOverlay for transition
applyFileOverlay for xml
applyFileOverlay for raw
applyFileOverlay for color
applyFileOverlay for menu
applyFileOverlay for font
applyFileOverlay for mipmap
]
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg, Int32 retiresOnFailure)
UnityEditor.HostView:OnGUI()
I am not sure this is the issue, but you’re using a preview version of the Android SDK tools:
C:\Users\carlo\AppData\Local\Android\sdk\build-tools\26.0.0-preview
Don’t do that; instead, use stable versions that are known to work. Try this and see if it helps. You can simply remove or move the preview folder into some other location so that Unity won’t pick it up as the one to use.
given name (at ‘label’ with value ’ @anon_76954444 /app_name’).
/Volumes/Workspace/Drawy Internal/Temp/gradleOut/AN_Res/build/intermediates/manifests/aapt/release/AndroidManifest.xml:20: error: Error: No resource found that matches the given name (at ‘icon’ with value ‘@drawable/app_icon’).
/Volumes/Workspace/Drawy Internal/Temp/gradleOut/AN_Res/build/intermediates/manifests/aapt/release/AndroidManifest.xml:20: error: Error: No resource found that matches the given name (at ‘label’ with value ’ @anon_76954444 /app_name’).
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:AN_Res:processReleaseResources’.
com.android.ide.common.process.ProcessException: Failed to execute aapt
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
This is a known issue when building with Gradle - libraries cannot include references to resources that they don’t define.
See more information about this in this troubleshooting page: Unity - Manual: Gradle for Android
When i set package name as my project name, it gives an errors which says:
D8: Program type already present: com.MyCompany.MyGame.BuildConfig
When i leave package name as it is, it gives an errors which says:
Resource ‘string/app_name’ not found in AndroidManifest.xml:10
So which one should i remove from AndroidManifest.xml ? I’m sorry if it’s a stupid question…
Resource not found
An AndroidManifest.xml file, either the main one or in a library, references a non-existing resource. Often it is the application icon or label string that is set by a library. This can happen if you have copied your main manifest to a library project without removing those references.
Remove the attribute from one of the Android Manifests – normally the one from the library.