Getting error while trying to rebuild a project in Android Studio - android

Executing tasks: [clean, :app:assembleDebug] in project C:\AppiumProject
Task :clean UP-TO-DATE
Task :app:clean
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :app:compileDebugAidl NO-SOURCE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:dataBindingMergeDependencyArtifactsDebug
Task :app:dataBindingMergeGenClassesDebug
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:generateDebugBuildConfig
Task :app:javaPreCompileDebug
Task :app:checkDebugAarMetadata
Task :app:createDebugCompatibleScreenManifests
Task :app:extractDeepLinksDebug
Task :app:processDebugMainManifest
Task :app:processDebugManifest
Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
Task :app:mergeDebugResources
Task :app:mergeDebugShaders
Task :app:dataBindingGenBaseClassesDebug
Task :app:compileDebugShaders NO-SOURCE
Task :app:generateDebugAssets UP-TO-DATE
Task :app:mergeDebugAssets
Task :app:compressDebugAssets
Task :app:processDebugJavaRes NO-SOURCE
Task :app:checkDebugDuplicateClasses
Task :app:mergeLibDexDebug
Task :app:mergeDebugJniLibFolders
Task :app:processDebugManifestForPackage
Task :app:mergeDebugJavaResource FAILED
Task :app:desugarDebugFileDependencies
Task :app:mergeDebugNativeLibs
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
2 files found with path 'META-INF/DEPENDENCIES' from inputs:
- C:\AppiumProject\app\libs\httpclient-4.5.5.jar
- C:\AppiumProject\app\libs\httpcore-4.4.9.jar
Adding a packagingOptions block may help, please refer to
https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html
for more information
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 1m 3s
24 actionable tasks: 23 executed, 1 up-to-date

Related

a failure occured while executing com.android.build.gradle.internal.tasks.Workers$actionFacade see the console for details

i got several error when i build unity project to apk
Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Task :launcher:preBuild UP-TO-DATE
Task :unityLibrary:preBuild UP-TO-DATE
Task :launcher:preReleaseBuild UP-TO-DATE
Task :unityLibrary:preReleaseBuild UP-TO-DATE
Task :unityLibrary:compileReleaseAidl NO-SOURCE
Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
Task :launcher:generateReleaseBuildConfig UP-TO-DATE
Task :launcher:compileReleaseAidl NO-SOURCE
Task :unityLibrary:generateReleaseResValues UP-TO-DATE
Task :unityLibrary:generateReleaseResources UP-TO-DATE
Task :launcher:compileReleaseRenderscript NO-SOURCE
Task :launcher:javaPreCompileRelease UP-TO-DATE
Task :launcher:generateReleaseResValues UP-TO-DATE
Task :launcher:generateReleaseResources UP-TO-DATE
Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
Task :unityLibrary:packageReleaseResources UP-TO-DATE
Task :launcher:extractDeepLinksRelease UP-TO-DATE
Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
Task :launcher:mergeReleaseResources UP-TO-DATE
Task :launcher:prepareLintJar UP-TO-DATE
Task :launcher:checkReleaseDuplicateClasses UP-TO-DATE
Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
Task :launcher:mergeReleaseShaders UP-TO-DATE
Task :launcher:compileReleaseShaders NO-SOURCE
Task :launcher:generateReleaseAssets UP-TO-DATE
Task :launcher:processReleaseJavaRes NO-SOURCE
Task :launcher:collectReleaseDependencies UP-TO-DATE
Task :launcher:sdkReleaseDependencyData UP-TO-DATE
Task :launcher:mergeReleaseJniLibFolders UP-TO-DATE
Task :launcher:validateSigningRelease UP-TO-DATE
Task :launcher:desugarReleaseFileDependencies
Task :launcher:mergeExtDexRelease UP-TO-DATE
Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
Task :unityLibrary:compileReleaseShaders NO-SOURCE
Task :unityLibrary:generateReleaseAssets UP-TO-DATE
Task :unityLibrary:packageReleaseAssets
Task :unityLibrary:parseReleaseLocalResources
Task :unityLibrary:processReleaseJavaRes NO-SOURCE
Task :unityLibrary:bundleLibResRelease NO-SOURCE
Task :unityLibrary:mergeReleaseJniLibFolders UP-TO-DATE
Task :unityLibrary:mergeReleaseNativeLibs UP-TO-DATE
Task :unityLibrary:stripReleaseDebugSymbols UP-TO-DATE
Task :unityLibrary:copyReleaseJniLibsProjectOnly UP-TO-DATE
Task :launcher:mergeReleaseAssets
Task :launcher:mergeReleaseJavaResource UP-TO-DATE
Task :launcher:mergeReleaseNativeLibs UP-TO-DATE
Task :launcher:stripReleaseDebugSymbols UP-TO-DATE
Task :unityLibrary:processReleaseManifest
Task :unityLibrary:generateReleaseRFile
Task :launcher:processReleaseManifest
aapt2.exe W 11-19 13:53:53 11828 12404 LoadedArsc.cpp:657] Unknown chunk type '200'.
Task :launcher:processReleaseResources
Task :unityLibrary:compileReleaseJavaWithJavac
Task :unityLibrary:bundleLibCompileToJarRelease UP-TO-DATE
Task :unityLibrary:bundleLibRuntimeToJarRelease UP-TO-DATE
Task :launcher:compileReleaseJavaWithJavac
Task :launcher:compileReleaseSources
Task :launcher:lintVitalRelease
Task :launcher:dexBuilderRelease
Task :launcher:mergeDexRelease UP-TO-DATE
Task :launcher:packageRelease FAILED
45 actionable tasks: 13 executed, 32 up-to-date
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
is there any solution?
i've seen some similar question but no solution
solution for my project

Facing issue with unity Android build

Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Task :unityLibrary:preBuild UP-TO-DATE
Task :launcher:preBuild UP-TO-DATE
Task :launcher:preDebugBuild UP-TO-DATE
Task :unityLibrary:preDebugBuild UP-TO-DATE
Task :unityLibrary:compileDebugAidl NO-SOURCE
Task :unityLibrary:packageDebugRenderscript NO-SOURCE
Task :unityLibrary:compileDebugRenderscript NO-SOURCE
Task :unityLibrary:generateDebugResValues
Task :unityLibrary:generateDebugResources
Task :launcher:generateDebugBuildConfig
Task :launcher:compileDebugAidl NO-SOURCE
Task :launcher:compileDebugRenderscript NO-SOURCE
Task :launcher:javaPreCompileDebug UP-TO-DATE
Task :launcher:generateDebugResValues
Task :launcher:generateDebugResources
Task :launcher:createDebugCompatibleScreenManifests
Task :launcher:extractDeepLinksDebug
Task :launcher:mergeDebugShaders
Task :launcher:compileDebugShaders
Task :launcher:generateDebugAssets
Task :launcher:processDebugJavaRes NO-SOURCE
Task :unityLibrary:packageDebugResources
Task :unityLibrary:extractDeepLinksDebug
Task :launcher:checkDebugDuplicateClasses
Task :unityLibrary:generateDebugBuildConfig
Task :unityLibrary:processDebugManifest
Task :unityLibrary:mergeDebugShaders
Task :unityLibrary:javaPreCompileDebug
Task :unityLibrary:compileDebugShaders
Task :unityLibrary:generateDebugAssets
Task :launcher:processDebugManifest
Task :launcher:mergeDebugJniLibFolders
Task :launcher:validateSigningDebug
Task :launcher:mergeDebugResources
Task :unityLibrary:packageDebugAssets
Task :unityLibrary:processDebugJavaRes NO-SOURCE
Task :unityLibrary:bundleLibResDebug
Task :unityLibrary:mergeDebugJniLibFolders
Task :unityLibrary:mergeDebugNativeLibs UP-TO-DATE
Task :unityLibrary:stripDebugDebugSymbols UP-TO-DATE
Task :unityLibrary:copyDebugJniLibsProjectOnly UP-TO-DATE
Task :unityLibrary:compileDebugLibraryResources
Task :unityLibrary:parseDebugLocalResources
Task :unityLibrary:generateDebugRFile
Task :launcher:mergeDebugAssets
Task :unityLibrary:compileDebugJavaWithJavac
Task :unityLibrary:bundleLibCompileToJarDebug UP-TO-DATE
Task :unityLibrary:bundleLibRuntimeToJarDebug UP-TO-DATE
aapt2 W 09-26 01:10:06 39385 552603 LoadedArsc.cpp:657] Unknown chunk type '200'.
Task :launcher:processDebugResources
Task :launcher:compileDebugJavaWithJavac UP-TO-DATE
Task :launcher:compileDebugSources UP-TO-DATE
Task :launcher:mergeDebugJavaResource UP-TO-DATE
Task :launcher:mergeLibDexDebug UP-TO-DATE
Task :launcher:dexBuilderDebug UP-TO-DATE
Task :launcher:mergeProjectDexDebug UP-TO-DATE
Task :launcher:mergeDebugNativeLibs UP-TO-DATE
Task :launcher:stripDebugDebugSymbols FAILED
Task :launcher:desugarDebugFileDependencies
42 actionable tasks: 30 executed, 12 up-to-date
UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions)
Osmo.Shared.Build.BuildBase:BuildTo (Osmo.GameHelper.Build.OsmoBuildConfigObject) (at Assets/Osmo/osmodules/shared/Editor/Build/BuildBase.cs:304)
Osmo.Container.Build.BuildContainer:StartBuild (Osmo.GameHelper.Build.OsmoBuildConfigObject) (at Assets/Editor/Scripts/BuildContainer.cs:34)
Osmo.Container.Build.BuildContainer:StartBuild (Osmo.GameHelper.Build.OsmoBuildConfigTarget,string,bool,bool) (at Assets/Editor/Scripts/BuildContainer.cs:30)
Osmo.Container.Build.BuildMenu:StartBuildAndroidLenovoDebug () (at Assets/Editor/Scripts/BuildMenu.cs:54)

React Native Native Java Module Tests run when 'androidTest' but not when 'Test'

I am on a MacBook Running Android Studio
Under a React Native Project, the TypeScript tests run fine with jest but when we added JUnit tests under a Native Java Module, while it works individually or by folder as long as they are in androidTest, whenever we run "All Tests" in Android Studio, or when they are run under test we get a false fail. The error is always the same.
Running the same tests under Android Tests works
when in android/app/src/androidTest/.../
gives
Yet running the same tests under Tests fails
when I copy them into android/app/src/test/.../
or leave them in androidTest and run all tests
it always gives
So, all these unit tests live happily in android/app/src/androidTest/.../ and do not like being in android/app/src/test/.../ (when I copy/paste them to the android/app/src/test/.../ path the androidTest passes in the ide, but the test version of the same test doesn't pass) But the bad part is the fail is the same: They fail under "Run 'All Tests'" when in /androidTest and give the same reason as if they are wrongly in /test. i.e. "Run 'All Tests'" and "Run unit tests in ''" both fail for the same reason
this is the error dump I get
Executing tasks: [:app:testDebugUnitTest] in project
/Users/local/some/domain/my-app/android
> Configure project :
Repository BintrayJCenter (https://jcenter.bintray.com/) removed, using https://pkgs.dev.azure.com/somedomain/O-Common/maven/v1
Repository MavenRepo (https://repo.maven.apache.org/maven2/) removed, using https://pkgs.dev.azure.com/somedomain/O-Common/maven/v1
Repository Google (https://dl.google.com/dl/android/maven2/) removed, using https://pkgs.dev.azure.com/somedomain/O-Common/maven/v1
...
> Task :app:generatePackageList
> Task :app:preBuild
> Task :app:preDebugBuild
> Task :react-native-community_art:preBuild UP-TO-DATE
> Task :react-native-community_art:preDebugBuild UP-TO-DATE
> Task :react-native-community_art:compileDebugAidl NO-SOURCE
> Task :react-native-community_masked-view:preBuild UP-TO-DATE
> Task :react-native-community_masked-view:preDebugBuild UP-TO-DATE
> Task :react-native-community_masked-view:compileDebugAidl NO-SOURCE
> Task :react-native-cookies:preBuild UP-TO-DATE
> Task :react-native-cookies:preDebugBuild UP-TO-DATE
> Task :react-native-cookies:compileDebugAidl NO-SOURCE
> Task :react-native-datawedge-intents:preBuild UP-TO-DATE
> Task :react-native-datawedge-intents:preDebugBuild UP-TO-DATE
> Task :react-native-datawedge-intents:compileDebugAidl NO-SOURCE
> Task :react-native-device-info:preBuild UP-TO-DATE
> Task :react-native-device-info:preDebugBuild UP-TO-DATE
> Task :react-native-device-info:compileDebugAidl NO-SOURCE
> Task :react-native-exception-handler:preBuild UP-TO-DATE
> Task :react-native-exception-handler:preDebugBuild UP-TO-DATE
> Task :react-native-exception-handler:compileDebugAidl NO-SOURCE
> Task :react-native-gesture-handler:preBuild UP-TO-DATE
> Task :react-native-gesture-handler:preDebugBuild UP-TO-DATE
> Task :react-native-gesture-handler:compileDebugAidl NO-SOURCE
> Task :react-native-safe-area-context:preBuild UP-TO-DATE
> Task :react-native-safe-area-context:preDebugBuild UP-TO-DATE
> Task :react-native-safe-area-context:compileDebugAidl NO-SOURCE
> Task :react-native-screens:preBuild UP-TO-DATE
> Task :react-native-screens:preDebugBuild UP-TO-DATE
> Task :react-native-screens:compileDebugAidl NO-SOURCE
> Task :react-native-sound:preBuild UP-TO-DATE
> Task :react-native-sound:preDebugBuild UP-TO-DATE
> Task :react-native-sound:compileDebugAidl NO-SOURCE
> Task :react-native-svg:preBuild UP-TO-DATE
> Task :react-native-svg:preDebugBuild UP-TO-DATE
> Task :react-native-svg:compileDebugAidl NO-SOURCE
> Task :react-native-vector-icons:preBuild UP-TO-DATE
> Task :react-native-vector-icons:preDebugBuild UP-TO-DATE
> Task :react-native-vector-icons:compileDebugAidl NO-SOURCE
> Task :react-native-version-number:preBuild UP-TO-DATE
> Task :react-native-version-number:preDebugBuild UP-TO-DATE
> Task :react-native-version-number:compileDebugAidl NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :react-native-community_art:packageDebugRenderscript NO-SOURCE
> Task :react-native-community_masked-view:packageDebugRenderscript NO-SOURCE
> Task :react-native-cookies:packageDebugRenderscript NO-SOURCE
> Task :react-native-datawedge-intents:packageDebugRenderscript NO-SOURCE
> Task :react-native-device-info:packageDebugRenderscript NO-SOURCE
> Task :react-native-exception-handler:packageDebugRenderscript NO-SOURCE
> Task :react-native-gesture-handler:packageDebugRenderscript NO-SOURCE
> Task :react-native-safe-area-context:packageDebugRenderscript NO-SOURCE
> Task :react-native-screens:packageDebugRenderscript NO-SOURCE
> Task :react-native-sound:packageDebugRenderscript NO-SOURCE
> Task :react-native-svg:packageDebugRenderscript NO-SOURCE
> Task :react-native-vector-icons:packageDebugRenderscript NO-SOURCE
> Task :react-native-version-number:packageDebugRenderscript NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :react-native-community_art:writeDebugAarMetadata UP-TO-DATE
> Task :react-native-community_masked-view:writeDebugAarMetadata UP-TO-DATE
> Task :react-native-cookies:writeDebugAarMetadata UP-TO-DATE
> Task :react-native-datawedge-intents:writeDebugAarMetadata UP-TO-DATE
> Task :react-native-device-info:writeDebugAarMetadata UP-TO-DATE
> Task :react-native-exception-handler:writeDebugAarMetadata UP-TO-DATE
> Task :react-native-gesture-handler:writeDebugAarMetadata UP-TO-DATE
> Task :react-native-safe-area-context:writeDebugAarMetadata UP-TO-DATE
> Task :react-native-screens:writeDebugAarMetadata UP-TO-DATE
> Task :react-native-sound:writeDebugAarMetadata UP-TO-DATE
> Task :react-native-svg:writeDebugAarMetadata UP-TO-DATE
> Task :react-native-vector-icons:writeDebugAarMetadata UP-TO-DATE
> Task :react-native-version-number:writeDebugAarMetadata UP-TO-DATE
> Task :app:checkDebugAarMetadata UP-TO-DATE
> Task :app:bundleDebugJsAndAssets
Execution optimizations have been disabled for task ':app:bundleDebugJsAndAssets' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '/Users/local/some/domain/my-app'. Reason: Task ':app:bundleDebugJsAndAssets' uses this output of task ':react-native-version-number:writeDebugAarMetadata' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
warn Package lint-staged has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /Users/local/some/domain/my-app/node_modules/lint-staged/package.json
warning: the transform cache was reset.
Welcome to Metro!
Fast - Scalable - Integrated
info Writing bundle output to:, /Users/local/some/domain/my-app/android/app/build/generated/assets/react/debug/index.android.bundle
info Writing sourcemap output to:, /Users/local/some/domain/my-app/android/app/build/generated/sourcemaps/react/debug/index.android.bundle.map
info Done writing bundle output
info Done writing sourcemap output
info Copying 36 asset files
info Done copying assets
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :react-native-community_art:mergeDebugShaders UP-TO-DATE
> Task :react-native-community_art:compileDebugShaders NO-SOURCE
> Task :react-native-community_art:generateDebugAssets UP-TO-DATE
> Task :react-native-community_art:packageDebugAssets UP-TO-DATE
> Task :react-native-community_masked-view:mergeDebugShaders UP-TO-DATE
> Task :react-native-community_masked-view:compileDebugShaders NO-SOURCE
> Task :react-native-community_masked-view:generateDebugAssets UP-TO-DATE
> Task :react-native-community_masked-view:packageDebugAssets UP-TO-DATE
> Task :react-native-cookies:mergeDebugShaders UP-TO-DATE
> Task :react-native-cookies:compileDebugShaders NO-SOURCE
> Task :react-native-cookies:generateDebugAssets UP-TO-DATE
> Task :react-native-cookies:packageDebugAssets UP-TO-DATE
> Task :react-native-datawedge-intents:mergeDebugShaders UP-TO-DATE
> Task :react-native-datawedge-intents:compileDebugShaders NO-SOURCE
> Task :react-native-datawedge-intents:generateDebugAssets UP-TO-DATE
> Task :react-native-datawedge-intents:packageDebugAssets UP-TO-DATE
> Task :react-native-device-info:mergeDebugShaders UP-TO-DATE
> Task :react-native-device-info:compileDebugShaders NO-SOURCE
> Task :react-native-device-info:generateDebugAssets UP-TO-DATE
> Task :react-native-device-info:packageDebugAssets UP-TO-DATE
> Task :react-native-exception-handler:mergeDebugShaders UP-TO-DATE
> Task :react-native-exception-handler:compileDebugShaders NO-SOURCE
> Task :react-native-exception-handler:generateDebugAssets UP-TO-DATE
> Task :react-native-exception-handler:packageDebugAssets UP-TO-DATE
> Task :react-native-gesture-handler:mergeDebugShaders UP-TO-DATE
> Task :react-native-gesture-handler:compileDebugShaders NO-SOURCE
> Task :react-native-gesture-handler:generateDebugAssets UP-TO-DATE
> Task :react-native-gesture-handler:packageDebugAssets UP-TO-DATE
> Task :react-native-safe-area-context:mergeDebugShaders UP-TO-DATE
> Task :react-native-safe-area-context:compileDebugShaders NO-SOURCE
> Task :react-native-safe-area-context:generateDebugAssets UP-TO-DATE
> Task :react-native-safe-area-context:packageDebugAssets UP-TO-DATE
> Task :react-native-screens:mergeDebugShaders UP-TO-DATE
> Task :react-native-screens:compileDebugShaders NO-SOURCE
> Task :react-native-screens:generateDebugAssets UP-TO-DATE
> Task :react-native-screens:packageDebugAssets UP-TO-DATE
> Task :react-native-sound:mergeDebugShaders UP-TO-DATE
> Task :react-native-sound:compileDebugShaders NO-SOURCE
> Task :react-native-sound:generateDebugAssets UP-TO-DATE
> Task :react-native-sound:packageDebugAssets UP-TO-DATE
> Task :react-native-svg:mergeDebugShaders UP-TO-DATE
> Task :react-native-svg:compileDebugShaders NO-SOURCE
> Task :react-native-svg:generateDebugAssets UP-TO-DATE
> Task :react-native-svg:packageDebugAssets UP-TO-DATE
> Task :react-native-vector-icons:mergeDebugShaders UP-TO-DATE
- Gradle detected a problem with the following location: '/Users/local/some/domain/my-app/android/app/build/intermediates/navigation_json/debug/navigation.json'. Reason: Task ':app:processDebugMainManifest' uses this output of task ':app:copyDebugBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/Users/local/some/domain/my-app/android/app/build/intermediates/navigation_json/debug/navigation.json'. Reason: Task ':app:processDebugMainManifest' uses this output of task ':app:copyDebugReactNativeVectorIconFonts' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
/Users/local/some/domain/my-app/android/app/src/debug/AndroidManifest.xml:7:5-12:19 Warning:
application#android:allowBackup was tagged at AndroidManifest.xml:7 to replace other declarations but no other declaration present
> Task :app:processDebugManifest
Execution optimizations have been disabled for task ':app:processDebugManifest' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '/Users/local/some/domain/my-app/android/app/build/intermediates/compatible_screen_manifest/debug'. Reason: Task ':app:processDebugManifest' uses this output of task ':app:copyDebugBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/Users/local/some/domain/my-app/android/app/build/intermediates/compatible_screen_manifest/debug'. Reason: Task ':app:processDebugManifest' uses this output of task ':app:copyDebugReactNativeVectorIconFonts' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
- Gradle detected a problem with the following location: '/Users/local/some/domain/my-app/android/app/build/intermediates/merged_manifest/debug/AndroidManifest.xml'. Reason: Task ':app:processDebugManifest' uses this output of task ':app:copyDebugBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
> Task :react-native-svg:processDebugJavaRes NO-SOURCE
> Task :react-native-svg:bundleLibResDebug NO-SOURCE
> Task :react-native-svg:bundleLibRuntimeToJarDebug UP-TO-DATE
> Task :react-native-vector-icons:processDebugJavaRes NO-SOURCE
> Task :react-native-vector-icons:bundleLibResDebug NO-SOURCE
> Task :react-native-vector-icons:bundleLibRuntimeToJarDebug UP-TO-DATE
> Task :react-native-version-number:processDebugJavaRes NO-SOURCE
> Task :react-native-version-number:bundleLibResDebug NO-SOURCE
> Task :react-native-version-number:bundleLibRuntimeToJarDebug UP-TO-DATE
> Task :app:processDebugResources
> Task :app:compileDebugJavaWithJavac UP-TO-DATE
> Task :app:bundleDebugClasses UP-TO-DATE
> Task :app:compileDebugUnitTestJavaWithJavac UP-TO-DATE
> Task :app:packageDebugUnitTestForUnitTest UP-TO-DATE
> Task :app:generateDebugUnitTestConfig UP-TO-DATE
> Task :app:testDebugUnitTest
Called loadFromPath(/system/framework/framework-res.apk, true); mode=binary sdk=28
java.lang.NullPointerException
at java.base/java.io.File.<init>(File.java:278)
at com.facebook.soloader.ApplicationSoSource.<init>(ApplicationSoSource.java:46)
at com.facebook.soloader.SoLoader.initSoSources(SoLoader.java:285)
at com.facebook.soloader.SoLoader.init(SoLoader.java:207)
at com.facebook.soloader.SoLoader.init(SoLoader.java:189)
at com.facebook.soloader.SoLoader.init(SoLoader.java:217)
at uk.some.domain.myapp.MainApplication.onCreate(MainApplication.java:78)
at org.robolectric.android.internal.AndroidTestEnvironment.lambda$installAndCreateApplication$0(AndroidTestEnvironment.java:288)
at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:75)
at org.robolectric.android.internal.AndroidTestEnvironment.installAndCreateApplication(AndroidTestEnvironment.java:288)
at org.robolectric.android.internal.AndroidTestEnvironment.setUpApplicationState(AndroidTestEnvironment.java:171)
at org.robolectric.RobolectricTestRunner.beforeTest(RobolectricTestRunner.java:319)
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$0(SandboxTestRunner.java:254)
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:89)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
java.lang.NullPointerException
at java.base/java.io.File.<init>(File.java:278)
at com.facebook.soloader.ApplicationSoSource.<init>(ApplicationSoSource.java:46)
at com.facebook.soloader.SoLoader.initSoSources(SoLoader.java:285)
at com.facebook.soloader.SoLoader.init(SoLoader.java:207)
at com.facebook.soloader.SoLoader.init(SoLoader.java:189)
at com.facebook.soloader.SoLoader.init(SoLoader.java:217)
at uk.some.domain.myapp.MainApplication.onCreate(MainApplication.java:78)
at org.robolectric.android.internal.AndroidTestEnvironment.lambda$installAndCreateApplication$0(AndroidTestEnvironment.java:288)
at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:75)
at org.robolectric.android.internal.AndroidTestEnvironment.installAndCreateApplication(AndroidTestEnvironment.java:288)
at org.robolectric.android.internal.AndroidTestEnvironment.setUpApplicationState(AndroidTestEnvironment.java:171)
at org.robolectric.RobolectricTestRunner.beforeTest(RobolectricTestRunner.java:319)
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$0(SandboxTestRunner.java:254)
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:89)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
java.lang.NullPointerException
at java.base/java.io.File.<init>(File.java:278)
at com.facebook.soloader.ApplicationSoSource.<init>(ApplicationSoSource.java:46)
at com.facebook.soloader.SoLoader.initSoSources(SoLoader.java:285)
at com.facebook.soloader.SoLoader.init(SoLoader.java:207)
at com.facebook.soloader.SoLoader.init(SoLoader.java:189)
at com.facebook.soloader.SoLoader.init(SoLoader.java:217)
at uk.some.domain.myapp.MainApplication.onCreate(MainApplication.java:78)
at org.robolectric.android.internal.AndroidTestEnvironment.lambda$installAndCreateApplication$0(AndroidTestEnvironment.java:288)
at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:75)
at org.robolectric.android.internal.AndroidTestEnvironment.installAndCreateApplication(AndroidTestEnvironment.java:288)
at org.robolectric.android.internal.AndroidTestEnvironment.setUpApplicationState(AndroidTestEnvironment.java:171)
at org.robolectric.RobolectricTestRunner.beforeTest(RobolectricTestRunner.java:319)
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$0(SandboxTestRunner.java:254)
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:89)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
java.lang.NullPointerException
at java.base/java.io.File.<init>(File.java:278)
at com.facebook.soloader.ApplicationSoSource.<init>(ApplicationSoSource.java:46)
at com.facebook.soloader.SoLoader.initSoSources(SoLoader.java:285)
at com.facebook.soloader.SoLoader.init(SoLoader.java:207)
at com.facebook.soloader.SoLoader.init(SoLoader.java:189)
at com.facebook.soloader.SoLoader.init(SoLoader.java:217)
at uk.some.domain.myapp.MainApplication.onCreate(MainApplication.java:78)
at org.robolectric.android.internal.AndroidTestEnvironment.lambda$installAndCreateApplication$0(AndroidTestEnvironment.java:288)
at org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:75)
at org.robolectric.android.internal.AndroidTestEnvironment.installAndCreateApplication(AndroidTestEnvironment.java:288)
at org.robolectric.android.internal.AndroidTestEnvironment.setUpApplicationState(AndroidTestEnvironment.java:171)
at org.robolectric.RobolectricTestRunner.beforeTest(RobolectricTestRunner.java:319)
at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$0(SandboxTestRunner.java:254)
at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:89)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
uk.some.domain.myapp.HubTest > testSendEvent_Object FAILED
java.lang.NullPointerException at File.java:278
uk.some.domain.myapp.HubTest > testSendEvent_String FAILED
java.lang.NullPointerException at File.java:278
uk.some.domain.myapp.HubTest > testBridgeHelloWorld FAILED
java.lang.NullPointerException at File.java:278
uk.some.domain.myapp.HubTest > testResetScreenTimer FAILED
java.lang.NullPointerException at File.java:278
4 tests completed, 4 failed
> Task :app:testDebugUnitTest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:testDebugUnitTest'.
> There were failing tests. See the report at: file:///Users/local/some/domain/my-app/android/app/build/reports/tests/testDebugUnitTest/index.html
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
Execution optimizations have been disabled for 4 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
BUILD FAILED in 44s
220 actionable tasks: 7 executed, 213 up-to-date
13:20:03: Task execution finished ':app:testDebugUnitTest --tests "uk.some.domain.myapp.*"'.
For CI reasons it needs to run under "All Tasks" it appears to be emulator related, can anyone shed light on the cause?
I think this is related to Unit VS Instrumentation tests.
Unit is made for single method / small part of code testing on the local machine (Test folder).
Instrumentation tests on the other hand are made for a more complex testing of features, directly on an emulator (AndroidTest folder).
Possible Solution :
First, I would check every test and ensure they have to run on machine or in emulator, and set them in the proper directory.
Then, you 'll have to run an emulator in your CI to make all your instrumentation tests run properly.
Check testing fundamentals for more informations

AAPT: error: attribute android:extractNativeLibs not found

I tried to build APK from unity exported project
and then I encountered error
I need to build it using SDK version 22 (android 5.1)
the main problem is
Execution failed for task ':launcher:processDebugResources'
the detail as below
Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Task :unityLibrary:preBuild UP-TO-DATE
Task :launcher:preBuild UP-TO-DATE
Task :launcher:preDebugBuild UP-TO-DATE
Task :unityLibrary:preDebugBuild UP-TO-DATE
Task :unityLibrary:compileDebugAidl NO-SOURCE
Task :unityLibrary:packageDebugRenderscript NO-SOURCE
Task :launcher:generateDebugBuildConfig UP-TO-DATE
Task :unityLibrary:writeDebugAarMetadata UP-TO-DATE
Task :launcher:compileDebugAidl NO-SOURCE
Task :unityLibrary:compileDebugRenderscript NO-SOURCE
Task :launcher:compileDebugRenderscript NO-SOURCE
Task :unityLibrary:generateDebugResValues UP-TO-DATE
Task :launcher:javaPreCompileDebug UP-TO-DATE
Task :unityLibrary:generateDebugResources UP-TO-DATE
Task :launcher:checkDebugAarMetadata UP-TO-DATE
Task :launcher:generateDebugResValues UP-TO-DATE
Task :unityLibrary:packageDebugResources UP-TO-DATE
Task :launcher:generateDebugResources UP-TO-DATE
Task :unityLibrary:extractDeepLinksDebug UP-TO-DATE
Task :launcher:mergeDebugResources UP-TO-DATE
Task :unityLibrary:processDebugManifest UP-TO-DATE
Task :launcher:createDebugCompatibleScreenManifests UP-TO-DATE
Task :unityLibrary:compileDebugLibraryResources UP-TO-DATE
Task :launcher:extractDeepLinksDebug UP-TO-DATE
Task :launcher:processDebugMainManifest UP-TO-DATE
Task :launcher:processDebugManifest UP-TO-DATE
Task :launcher:processDebugManifestForPackage UP-TO-DATE
Task :unityLibrary:parseDebugLocalResources UP-TO-DATE
Task :launcher:mergeDebugNativeDebugMetadata NO-SOURCE
Task :launcher:mergeDebugShaders UP-TO-DATE
Task :launcher:compileDebugShaders NO-SOURCE
Task :launcher:generateDebugAssets UP-TO-DATE
Task :unityLibrary:generateDebugRFile UP-TO-DATE
Task :launcher:processDebugJavaRes NO-SOURCE
Task :unityLibrary:generateDebugBuildConfig UP-TO-DATE
Task :unityLibrary:javaPreCompileDebug UP-TO-DATE
Task :unityLibrary:compileDebugJavaWithJavac UP-TO-DATE
Task :unityLibrary:bundleLibCompileToJarDebug UP-TO-DATE
Task :unityLibrary:mergeDebugShaders UP-TO-DATE
Task :unityLibrary:compileDebugShaders NO-SOURCE
Task :unityLibrary:generateDebugAssets UP-TO-DATE
Task :unityLibrary:packageDebugAssets UP-TO-DATE
Task :unityLibrary:processDebugJavaRes NO-SOURCE
Task :unityLibrary:bundleLibResDebug NO-SOURCE
Task :unityLibrary:bundleLibRuntimeToJarDebug UP-TO-DATE
Task :unityLibrary:mergeDebugJniLibFolders UP-TO-DATE
Task :unityLibrary:mergeDebugNativeLibs UP-TO-DATE
Task :unityLibrary:stripDebugDebugSymbols UP-TO-DATE
WARNING: NDK was located by using ndk.dir property. This method is deprecated and will be removed in a future release. Please use android.ndkVersion or android.ndkPath in build.gradle to specify the NDK to use. https://developer.android.com/r/studio-ui/ndk-dir
NDK was located by using ndk.dir property. This method is deprecated and will be removed in a future release. Please use android.ndkVersion or android.ndkPath in build.gradle to specify the NDK to use. https://developer.android.com/r/studio-ui/ndk-dir
Task :unityLibrary:copyDebugJniLibsProjectOnly UP-TO-DATE
Task :launcher:processDebugResources FAILED
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/Users/thedventh/Documents/Builds/[AndroidProj]AlQolam-Mathkids/launcher/build/intermediates/packaged_manifests/debug/AndroidManifest.xml","position":{"startLine":36}}],"original":"/Users/thedventh/Documents/Builds/[AndroidProj]AlQolam-Mathkids/launcher/build/intermediates/packaged_manifests/debug/AndroidManifest.xml:37: AAPT: error: attribute android:extractNativeLibs not found.\n ","tool":"AAPT"}
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':launcher:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
/Users/thedventh/Documents/Builds/[AndroidProj]AlQolam-Mathkids/launcher/build/intermediates/packaged_manifests/debug/AndroidManifest.xml:37: AAPT: error: attribute android:extractNativeLibs not found.
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 1s
31 actionable tasks: 1 executed, 30 up-to-date
Any help or info are appreciated
thanks you

Why my gradle task is not executing in android studio

I am trying to execute a gradle task in my android project. At the end of the module level build.gradle file I added the following
tasks.register("hello"){
doLast{
println 'hellotask25'
}
}
When running ./gradlew hello from the terminal the task runs as expected. Here is the output
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
> Task :app:hello
hellotask25
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 35s
1 actionable task: 1 executed
But when I do Build->Rebuild Project the task is not running. It is not showing in the Build console.
> Task :clean
> Task :app:clean
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig
> Task :app:generateDebugResValues
> Task :app:generateDebugResources
> Task :app:checkDebugAarMetadata
> Task :app:createDebugCompatibleScreenManifests
> Task :app:extractDeepLinksDebug
> Task :app:processDebugMainManifest
> Task :app:processDebugManifest
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :app:javaPreCompileDebug
> Task :app:mergeDebugShaders
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets
> Task :app:compressDebugAssets
> Task :app:processDebugManifestForPackage
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:mergeDebugResources
> Task :app:desugarDebugFileDependencies
> Task :app:mergeDebugJniLibFolders
> Task :app:mergeDebugNativeLibs NO-SOURCE
> Task :app:stripDebugDebugSymbols NO-SOURCE
> Task :app:validateSigningDebug
> Task :app:writeDebugAppMetadata
> Task :app:writeDebugSigningConfigVersions
> Task :app:checkDebugDuplicateClasses
> Task :app:mergeLibDexDebug
> Task :app:mergeExtDexDebug
> Task :app:processDebugResources
> Task :app:compileDebugKotlin
> Task :app:compileDebugJavaWithJavac
> Task :app:compileDebugSources
> Task :app:dexBuilderDebug
> Task :app:mergeProjectDexDebug
> Task :app:mergeDebugJavaResource
> Task :app:packageDebug
> Task :app:assembleDebug
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 23s
30 actionable tasks: 30 executed
How do I solve this problem? I want to run this task when Anroid studio build my application

Categories

Resources