SO WHEN I CLICK BUILD PROJECT IT SAYS ZERO ERRORS BUT I STILL GET THIS
Executing tasks: [clean, :unityLibrary:assembleDebug, :launcher:assembleDebug] in
project C:\Users\mehmo\OneDrive\Documents\Game
> Configure project :launcher
WARNING: The option 'android.enableR8' is deprecated and should not be used
anymore.
It will be removed in a future version of the Android Gradle plugin, and will no
longer allow you to disable R8.
> Task :clean UP-TO-DATE
> Task :launcher:clean
> Task :launcher:preBuild UP-TO-DATE
> Task :launcher:preDebugBuild UP-TO-DATE
> Task :launcher:mergeDebugJniLibFolders
> Task :launcher:generateDebugBuildConfig
> Task :launcher:generateDebugResValues
> Task :launcher:mergeDebugNativeLibs
> Task :launcher:stripDebugDebugSymbols
> Task :launcher:copyDebugJniLibsProjectAndLocalJars
> Task :launcher:mergeDebugShaders
> Task :launcher:compileDebugShaders
> Task :launcher:generateDebugAssets
> Task :launcher:packageDebugAssets
> Task :launcher:packageDebugRenderscript NO-SOURCE
> Task :launcher:prepareLintJarForPublish UP-TO-DATE
> Task :launcher:processDebugJavaRes NO-SOURCE
> Task :launcher:processDebugManifest
> Task :launcher:mergeDebugJavaResource
> Task :unityLibrary:clean
> Task :unityLibrary:preBuild UP-TO-DATE
> Task :unityLibrary:preDebugBuild UP-TO-DATE
> Task :unityLibrary:compileDebugAidl NO-SOURCE
> Task :launcher:compileDebugAidl NO-SOURCE
> Task :unityLibrary:BuildIl2CppTask
Building libil2cpp.so with AndroidToolChain
Output directory: C:\Users\mehmo\OneDrive\Documents\Game\unityLibrary\src\main\jniLibs\armeabi-v7a
Cache directory: C:\Users\mehmo\OneDrive\Documents\Game\unityLibrary\build\il2cpp_armeabi-v7a_Release\il2cpp_cache
ObjectFiles: 221 of which compiled: 221
Time Compile: 12829 milliseconds Lump_libil2cpp_vm.cpp
Time Compile: 12407 milliseconds Il2CppInvokerTable.cpp
Time Compile: 11982 milliseconds Unity.TextMeshPro2.cpp
Time Compile: 11898 milliseconds Generics1.cpp
Time Compile: 11286 milliseconds Generics.cpp
Time Compile: 10922 milliseconds Unity.TextMeshPro3.cpp
Time Compile: 10625 milliseconds mscorlib4.cpp
Time Compile: 9856 milliseconds Unity.TextMeshPro4.cpp
Time Compile: 9713 milliseconds Lump_libil2cpp_icalls.cpp
Time Compile: 8830 milliseconds Generics10.cpp
Total compilation time: 56052 milliseconds.
Total link time: 2164 milliseconds.
Cleaned up 0 object files.
Building libil2cpp.so with AndroidToolChain
Output directory: C:\Users\mehmo\OneDrive\Documents\Game\unityLibrary\src\main\jniLibs\arm64-v8a
Cache directory: C:\Users\mehmo\OneDrive\Documents\Game\unityLibrary\build\il2cpp_arm64-v8a_Release\il2cpp_cache
ObjectFiles: 221 of which compiled: 221
Time Compile: 12777 milliseconds Lump_libil2cpp_vm.cpp
Time Compile: 11706 milliseconds Il2CppInvokerTable.cpp
Time Compile: 11465 milliseconds Generics1.cpp
Time Compile: 11200 milliseconds Unity.TextMeshPro2.cpp
Time Compile: 10710 milliseconds Generics.cpp
Time Compile: 10155 milliseconds Unity.TextMeshPro3.cpp
Time Compile: 9667 milliseconds Lump_libil2cpp_icalls.cpp
Time Compile: 9315 milliseconds mscorlib4.cpp
Time Compile: 9026 milliseconds Unity.TextMeshPro4.cpp
Time Compile: 8415 milliseconds Generics3.cpp
Total compilation time: 54646 milliseconds.
Total link time: 3373 milliseconds.
Cleaned up 0 object files.
> Task :unityLibrary:mergeDebugJniLibFolders
> Task :unityLibrary:compileDebugRenderscript NO-SOURCE
> Task :unityLibrary:generateDebugBuildConfig
> Task :unityLibrary:generateDebugResValues
> Task :unityLibrary:generateDebugResources
> Task :unityLibrary:packageDebugResources
> Task :unityLibrary:parseDebugLocalResources
> Task :unityLibrary:mergeDebugShaders
> Task :unityLibrary:compileDebugShaders
> Task :unityLibrary:generateDebugAssets
> Task :unityLibrary:packageDebugAssets
> Task :unityLibrary:packageDebugRenderscript NO-SOURCE
> Task :launcher:compileDebugRenderscript NO-SOURCE
> Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
> Task :launcher:generateDebugResources
> Task :unityLibrary:processDebugJavaRes NO-SOURCE
> Task :unityLibrary:processDebugManifest
> Task :unityLibrary:javaPreCompileDebug
> Task :launcher:packageDebugResources
> Task :launcher:parseDebugLocalResources
> Task :unityLibrary:mergeDebugNativeLibs
> Task :unityLibrary:stripDebugDebugSymbols
> Task :unityLibrary:copyDebugJniLibsProjectAndLocalJars
> Task :unityLibrary:mergeDebugJavaResource
> Task :unityLibrary:generateDebugRFile
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':unityLibrary:compileDebugJavaWithJavac'.
Failed to query the value of task ':unityLibrary:compileDebugJavaWithJavac' property 'options.generatedSourceOutputDirectory'.
Querying the mapped value of map(java.io.File property(org.gradle.api.file.Directory, property(org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory, C:\Users\mehmo\OneDrive\Documents\Game\unityLibrary\build\generated\ap_generated_sources\debug\out))) org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer#35383760) before task ':unityLibrary:compileDebugJavaWithJavac' has completed is not supported
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.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1m 59s
34 actionable tasks: 31 executed, 3 up-to-date
IN DEBUG I GET THIS:
2021-05-19T16:15:40.480+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2021-05-19T16:15:40.480+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
2021-05-19T16:15:40.480+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2021-05-19T16:15:40.480+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2021-05-19T16:15:40.480+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':unityLibrary:compileDebugJavaWithJavac'.
2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Failed to query the value of task ':unityLibrary:compileDebugJavaWithJavac' property 'options.generatedSourceOutputDirectory'.
2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Querying the mapped value of map(java.io.File property(org.gradle.api.file.Directory, property(org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory, C:\Users\mehmo\OneDrive\Documents\Game\unityLibrary\build\generated\ap_generated_sources\debug\out))) org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer#4ece53fe) before task ':unityLibrary:compileDebugJavaWithJavac' has completed is not supported
2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. Run with --scan to get full insights.
2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
2021-05-19T16:15:40.481+0100 [WARN] [org.gradle.internal.featurelifecycle.LoggingDeprecatedFeatureHandler]
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.1/userguide/command_line_interface.html#sec:command_line_warnings
2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
2021-05-19T16:15:40.481+0100 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 2m 1s
I encountered this issue as well and decided to scrap my entire project and do a clean setup. Turns out that Gradle 7.x is incompatible with Android development. If you downgrade your Gradle to 6.9 everything works as expected.
This would explain also why "Build Project" works, but through Gradle it doesn't, it's a different wrapper instance.
Changing the Gradle version of distributionUrl in gradle-wrapper.properties file works for me.
I'm now using Unity 2021.3.5f1 version. From here (https://docs.unity3d.com/Manual/android-gradle-overview.html), I know that I should use Gradle version 6.1.1.
To change the Gradle version, open gradle-wrapper.properties file, update distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip with the Gradle version found above. Then, sync and rebuild the project. Build success!
Hope it would help you!
Related
When I build my app.. That error occurred..How can I fix it?
`
* What went wrong:
Execution failed for task ':app:dexBuilderDebug'.
> There were multiple failures while executing work items
> A failure occurred while executing com.android.build.gradle.internal.dexing.DexWorkAction
> Failed to process: /Users/Desktop/android1/Myapp/app/build/intermediates/javac/debug/classes
> A failure occurred while executing com.android.build.gradle.internal.dexing.DexWorkAction
> Failed to process: /Users/Desktop/android1/Myapp/app/build/intermediates/javac/debug/classes
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:dexBuilderDebug'.
at
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
at com.android.builder.dexing.D8DexArchiveBuilder.getExceptionToRethrow(D8DexArchiveBuilder.java:140)
at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:117)
at com.android.build.gradle.internal.dexing.DexWorkActionKt.process(DexWorkAction.kt:175)
... 34 more
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: /Users/Desktop/android1/Myapp/app/build/intermediates/javac/debug/classes/kr/myapp/HomeActivity$3 2.class
BUILD FAILED in 11s
`
I tried!!!!!!!!!But it doesn't work ㅠㅠ
I want to upgrade my project gradle version from 6.1.1 to 7.0.0 and above, but when I upgrade anything above 6.9 I get errors and cannot find the problem.
Them message it gives me is this:
> Configure project :core
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
> Configure project {name}
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.
WARNING: DSL element 'android.dataBinding.enabled' is obsolete and has been replaced with 'android.buildFeatures.dataBinding'.
It will be removed in version 5.0 of the Android Gradle plugin.
> Task :core:preBuild UP-TO-DATE
> Task :core:preDebugBuild UP-TO-DATE
> Task :core:compileDebugAidl NO-SOURCE
> Task :core:compileDebugRenderscript NO-SOURCE
> Task :core:generateDebugBuildConfig UP-TO-DATE
> Task :core:generateDebugResValues UP-TO-DATE
> Task :core:generateDebugResources UP-TO-DATE
> Task :core:packageDebugResources UP-TO-DATE
> Task :core:parseDebugLocalResources UP-TO-DATE
> Task :core:processDebugManifest UP-TO-DATE
> Task :core:generateDebugRFile UP-TO-DATE
> Task :core:kaptGenerateStubsDebugKotlin UP-TO-DATE
> Task :core:kaptDebugKotlin UP-TO-DATE
> Task :core:compileDebugKotlin UP-TO-DATE
> Task :core:javaPreCompileDebug UP-TO-DATE
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':core:compileDebugJavaWithJavac'.
> Failed to query the value of task ':core:compileDebugJavaWithJavac' property 'options.generatedSourceOutputDirectory'.
> Querying the mapped value of map(java.io.File property(org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory, {direcory}
org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer#cea20b4) before task ':core:compileDebugJavaWithJavac' has completed is not supported
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':core:compileDebugJavaWithJavac'.
at org.gradle.api.internal.tasks.properties.DefaultTaskProperties.resolve(DefaultTaskProperties.java:74)
at org.gradle.execution.plan.LocalTaskNode.resolveMutations(LocalTaskNode.java:202)
at org.gradle.execution.plan.DefaultExecutionPlan.getResolvedMutationInfo(DefaultExecutionPlan.java:654)
at org.gradle.execution.plan.DefaultExecutionPlan.selectNext(DefaultExecutionPlan.java:577)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$executeNextNode$1(DefaultPlanExecutor.java:166)
at org.gradle.internal.resources.DefaultResourceLockCoordinationService.withStateLock(DefaultResourceLockCoordinationService.java:45)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:155)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: org.gradle.api.internal.provider.AbstractProperty$PropertyQueryException: Failed to query the value of task ':core:compileDebugJavaWithJavac' property 'options.generatedSourceOutputDirectory'.
at org.gradle.api.internal.provider.AbstractProperty.doCalculateValue(AbstractProperty.java:136)
at org.gradle.api.internal.provider.AbstractProperty.calculateOwnValueNoProducer(AbstractProperty.java:121)
at org.gradle.api.internal.file.DefaultFilePropertyFactory$AbstractFileVar.access$100(DefaultFilePropertyFactory.java:180)
at org.gradle.api.internal.file.DefaultFilePropertyFactory$AbstractFileVar$2.calculateOwnValue(DefaultFilePropertyFactory.java:263)
at org.gradle.api.internal.provider.AbstractMinimalProvider.getOrNull(AbstractMinimalProvider.java:93)
at org.gradle.api.internal.tasks.properties.FileParameterUtils.resolveOutputFilePropertySpecs(FileParameterUtils.java:115)
at org.gradle.api.internal.tasks.properties.GetOutputFilesVisitor.visitOutputFileProperty(GetOutputFilesVisitor.java:44)
at org.gradle.api.internal.tasks.properties.CompositePropertyVisitor.visitOutputFileProperty(CompositePropertyVisitor.java:64)
at org.gradle.api.internal.tasks.properties.annotations.AbstractOutputPropertyAnnotationHandler.visitPropertyValue(AbstractOutputPropertyAnnotationHandler.java:50)
at org.gradle.api.internal.tasks.properties.bean.AbstractNestedRuntimeBeanNode.visitProperties(AbstractNestedRuntimeBeanNode.java:56)
at org.gradle.api.internal.tasks.properties.bean.NestedRuntimeBeanNode.visitNode(NestedRuntimeBeanNode.java:41)
at org.gradle.api.internal.tasks.properties.DefaultPropertyWalker.visitProperties(DefaultPropertyWalker.java:41)
at org.gradle.api.internal.tasks.TaskPropertyUtils.visitProperties(TaskPropertyUtils.java:44)
at org.gradle.api.internal.tasks.properties.DefaultTaskProperties.resolve(DefaultTaskProperties.java:65)
at org.gradle.execution.plan.LocalTaskNode.resolveMutations(LocalTaskNode.java:202)
at org.gradle.execution.plan.DefaultExecutionPlan.getResolvedMutationInfo(DefaultExecutionPlan.java:654)
at org.gradle.execution.plan.DefaultExecutionPlan.selectNext(DefaultExecutionPlan.java:577)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$executeNextNode$1(DefaultPlanExecutor.java:166)
at org.gradle.internal.resources.DefaultResourceLockCoordinationService.withStateLock(DefaultResourceLockCoordinationService.java:45)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:155)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: org.gradle.api.InvalidUserCodeException: Querying the mapped value of map(java.io.File property(org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory,{directory} org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer#cea20b4) before task ':core:compileDebugJavaWithJavac' has completed is not supported
at org.gradle.api.internal.provider.TransformBackedProvider.lambda$beforeRead$0(TransformBackedProvider.java:84)
at org.gradle.api.internal.provider.ValueSupplier$TaskProducer.visitContentProducerTasks(ValueSupplier.java:136)
at org.gradle.api.internal.provider.TransformBackedProvider.beforeRead(TransformBackedProvider.java:81)
at org.gradle.api.internal.provider.TransformBackedProvider.calculateOwnValue(TransformBackedProvider.java:63)
at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:103)
at org.gradle.api.internal.provider.MappingProvider.calculateOwnValue(MappingProvider.java:55)
at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(AbstractMinimalProvider.java:103)
at org.gradle.api.internal.provider.DefaultProperty.calculateValueFrom(DefaultProperty.java:128)
at org.gradle.api.internal.provider.DefaultProperty.calculateValueFrom(DefaultProperty.java:25)
at org.gradle.api.internal.provider.AbstractProperty.doCalculateValue(AbstractProperty.java:133)
... 23 more
* Get more help at https://help.gradle.org
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/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 3s
10 actionable tasks: 10 up-to-date
It has multiple libraries, and target and compile SDK is 30. I have tried to update some of the libraries like Hilt, but this does not fixed the issue. It has a lot of deprecated methods, but as I know this usually is not big problem.
I recently upgraded my expo's SDK version from 35 to 41 and also upgraded expo-cli from 3.18.5 to 4.4.3.
However, when I try to build a standalone APK/AAB, I'm getting the following error:
× Build failed. Standalone build failed!
In order to understand what was exactly causing this issue, I examined the Gradle logs of build Gradle on expo, and here's what I was able to find.
Installing unimodules:
unimodules-core#7.1.0 from /app/turtle/workingdir/android/sdk41/packages/#unimodules/core
unimodules-react-native-adapter#6.2.2 from /app/turtle/workingdir/android/sdk41/packages/#unimodules/react-native-adapter
expo-application#3.1.2 from /app/turtle/workingdir/android/sdk41/packages/expo-application
expo-barcode-scanner#10.1.2 from /app/turtle/workingdir/android/sdk41/packages/expo-barcode-scanner
expo-camera#11.0.2 from /app/turtle/workingdir/android/sdk41/packages/expo-camera
expo-constants#10.1.3 from /app/turtle/workingdir/android/sdk41/packages/expo-constants
expo-error-recovery#2.1.0 from /app/turtle/workingdir/android/sdk41/packages/expo-error-recovery
expo-file-system#11.0.2 from /app/turtle/workingdir/android/sdk41/packages/expo-file-system
expo-font#9.1.0 from /app/turtle/workingdir/android/sdk41/packages/expo-font
expo-image-loader#2.1.1 from /app/turtle/workingdir/android/sdk41/packages/expo-image-loader
expo-keep-awake#9.1.2 from /app/turtle/workingdir/android/sdk41/packages/expo-keep-awake
expo-notifications#0.11.6 from /app/turtle/workingdir/android/sdk41/packages/expo-notifications
unimodules-app-loader#2.1.0 from /app/turtle/workingdir/android/sdk41/packages/unimodules-app-loader
expo-permissions#12.0.1 from /app/turtle/workingdir/android/sdk41/packages/expo-permissions
unimodules-barcode-scanner-interface#6.1.0 from /app/turtle/workingdir/android/sdk41/packages/unimodules-barcode-scanner-interface
unimodules-camera-interface#6.1.0 from /app/turtle/workingdir/android/sdk41/packages/unimodules-camera-interface
unimodules-constants-interface#6.1.0 from /app/turtle/workingdir/android/sdk41/packages/unimodules-constants-interface
unimodules-face-detector-interface#6.1.0 from /app/turtle/workingdir/android/sdk41/packages/unimodules-face-detector-interface
unimodules-file-system-interface#6.1.0 from /app/turtle/workingdir/android/sdk41/packages/unimodules-file-system-interface
unimodules-font-interface#6.1.0 from /app/turtle/workingdir/android/sdk41/packages/unimodules-font-interface
unimodules-image-loader-interface#6.1.0 from /app/turtle/workingdir/android/sdk41/packages/unimodules-image-loader-interface
unimodules-permissions-interface#6.1.0 from /app/turtle/workingdir/android/sdk41/packages/unimodules-permissions-interface
unimodules-sensors-interface#6.1.0 from /app/turtle/workingdir/android/sdk41/packages/unimodules-sensors-interface
unimodules-task-manager-interface#6.1.0 from /app/turtle/workingdir/android/sdk41/packages/unimodules-task-manager-interface
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
> Task :app:preBuild UP-TO-DATE
> Task :app:extractProguardFiles
> Task :app:preReleaseBuild
> Task :app:compileReleaseRenderscript NO-SOURCE
> Task :app:generateReleaseResValues
> Task :app:generateReleaseResources
> Task :app:processReleaseGoogleServices
Parsing json file: /app/turtle/workingdir/android/sdk41/android-shell-app/app/google-services.json
> Task :app:createReleaseCompatibleScreenManifests
> Task :app:extractDeepLinksRelease
> Task :app:mergeReleaseResources
> Task :app:processReleaseMainManifest
[com.facebook.soloader:soloader:0.8.2] /root/.gradle/caches/transforms-3/cfd0b9e5b303f54f13e669e38ab029ae/transformed/jetified-soloader-0.8.2/AndroidManifest.xml Warning:
Package name 'com.facebook.soloader' used in: com.facebook.soloader:soloader:0.8.2, com.facebook.soloader:annotation:0.8.2.
/app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/AndroidManifest.xml:35:1-94 Warning:
Element uses-permission#android.permission.SYSTEM_ALERT_WINDOW at AndroidManifest.xml:35:1-94 duplicated with element declared at AndroidManifest.xml:16:3-76
/app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/AndroidManifest.xml:23:1-101 Warning:
uses-permission#android.permission.ACCESS_BACKGROUND_LOCATION was tagged at AndroidManifest.xml:23 to remove other declarations but no other declaration present
/app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/AndroidManifest.xml:24:1-87 Warning:
uses-permission#android.permission.RECORD_AUDIO was tagged at AndroidManifest.xml:24 to remove other declarations but no other declaration present
/app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/AndroidManifest.xml:26:1-89 Warning:
uses-permission#android.permission.WRITE_CONTACTS was tagged at AndroidManifest.xml:26 to remove other declarations but no other declaration present
/app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/AndroidManifest.xml:32:1-88 Warning:
uses-permission#android.permission.USE_BIOMETRIC was tagged at AndroidManifest.xml:32 to remove other declarations but no other declaration present
/app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/AndroidManifest.xml:33:1-82 Warning:
uses-permission#android.permission.VIBRATE was tagged at AndroidManifest.xml:33 to remove other declarations but no other declaration present
/app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/AndroidManifest.xml:34:1-91 Warning:
uses-permission#android.permission.READ_PHONE_STATE was tagged at AndroidManifest.xml:34 to remove other declarations but no other declaration present
/app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/AndroidManifest.xml:35:1-94 Warning:
uses-permission#android.permission.SYSTEM_ALERT_WINDOW was tagged at AndroidManifest.xml:35 to remove other declarations but no other declaration present
/app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/AndroidManifest.xml:37:1-83 Warning:
uses-permission#android.permission.READ_SMS was tagged at AndroidManifest.xml:37 to remove other declarations but no other declaration present
/app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/AndroidManifest.xml:38:1-99 Warning:
uses-permission#android.permission.REQUEST_INSTALL_PACKAGES was tagged at AndroidManifest.xml:38 to remove other declarations but no other declaration present
/app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/AndroidManifest.xml:41:1-104 Warning:
uses-permission#com.android.launcher.permission.INSTALL_SHORTCUT was tagged at AndroidManifest.xml:41 to remove other declarations but no other declaration present
/app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/AndroidManifest.xml:208:5-213:39 Warning:
activity#com.facebook.FacebookActivity#android:theme was tagged at AndroidManifest.xml:208 to replace other declarations but no other declaration present
/app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/AndroidManifest.xml:17:9-26:20 Warning:
provider#expo.modules.filesystem.FileSystemFileProvider#android:authorities was tagged at AndroidManifest.xml:17 to replace other declarations but no other declaration present
> Task :app:processReleaseManifest
> Task :app:processApplicationManifestReleaseForBundle
> Task :app:mergeReleaseShaders
> Task :app:compileReleaseShaders NO-SOURCE
> Task :app:generateReleaseAssets UP-TO-DATE
> Task :app:mergeReleaseAssets
> Task :app:compileReleaseAidl
NO-SOURCE
> Task :app:generateReleaseBuildConfig
> Task :app:checkReleaseDuplicateClasses
> Task :app:javaPreCompileRelease
> Task :app:checkReleaseAarMetadata
> Task :app:processReleaseJavaRes NO-SOURCE
> Task :app:bundleReleaseResources
> Task :app:mergeReleaseJniLibFolders
> Task :app:collectReleaseDependencies
> Task :app:configureReleaseDependencies
> Task :app:parseReleaseIntegrityConfig
> Task :app:validateSigningRelease
> Task :app:processReleaseManifestForPackage
> Task :app:mergeReleaseNativeLibs
> Task :app:processReleaseResources
> Task :app:mergeReleaseJavaResource
> Task :app:compileReleaseJavaWithJavac
[stderr] /app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/java/host/exp/exponent/generated/AppConstants.java:8: error: package expo.modules.splashscreen does not exist
[stderr] import expo.modules.splashscreen.SplashScreenImageResizeMode;
[stderr] ^
[stderr] /app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/java/host/exp/exponent/generated/AppConstants.java:25: error: cannot find symbol
[stderr] public static SplashScreenImageResizeMode SPLASH_SCREEN_IMAGE_RESIZE_MODE = SplashScreenImageResizeMode.CONTAIN;
[stderr] ^
[stderr] symbol: class SplashScreenImageResizeMode
[stderr] location: class AppConstants
[stderr] /app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/java/host/exp/exponent/generated/AppConstants.java:25: error: cannot find symbol
[stderr] public static SplashScreenImageResizeMode SPLASH_SCREEN_IMAGE_RESIZE_MODE = SplashScreenImageResizeMode.CONTAIN;
[stderr] ^
[stderr] symbol: variable SplashScreenImageResizeMode
[stderr] location: class AppConstants
[stderr] /app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/java/host/exp/exponent/generated/AppConstants.java:53: error: cannot access SplashScreenImageResizeMode
[stderr] constants.SPLASH_SCREEN_IMAGE_RESIZE_MODE = SPLASH_SCREEN_IMAGE_RESIZE_MODE;
[stderr] ^
[stderr] class file for expo.modules.splashscreen.SplashScreenImageResizeMode not found
[stderr] 4 errors
> Task :app:compileReleaseJavaWithJavac FAILED
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:compileReleaseJavaWithJavac'.
[stderr] > Compilation failed; see the compiler error output for details.
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 35s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8/userguide/command_line_interface.html#sec:command_line_warnings
26 actionable tasks: 26 executed
Error: ./gradlew exited with non-zero code: 1
at ChildProcess.completionListener (/app/turtle/node_modules/#expo/xdl/node_modules/#expo/spawn-async/build/spawnAsync.js:52:23)
at Object.onceWrapper (events.js:418:26)
at ChildProcess.emit (events.js:311:20)
at ChildProcess.EventEmitter.emit (domain.js:482:12)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
...
at spawnAsync (/app/turtle/node_modules/#expo/xdl/node_modules/#expo/spawn-async/build/spawnAsync.js:17:21)
at spawnAsyncThrowError (/app/turtle/node_modules/#expo/xdl/build/detach/ExponentTools.js:201:45)
at buildShellAppAsync (/app/turtle/node_modules/#expo/xdl/build/detach/AndroidShellApp.js:976:11)
at async Object.createAndroidShellAppAsync (/app/turtle/node_modules/#expo/xdl/build/detach/AndroidShellApp.js:396:5)
at async runShellAppBuilder (/app/turtle/build/builders/android.js:95:9)
at async Object.buildAndroid [as android] (/app/turtle/build/builders/android.js:43:28)
at async build (/app/turtle/build/jobManager.js:181:33)
at async processJob (/app/turtle/build/jobManager.js:118:32)
at async Object.doJob (/app/turtle/build/jobManager.js:49:5)
at async main (/app/turtle/build/server.js:66:13)
If we notice the above logs, it can be seen that the issue is mostly pertaining to the Splash screen.
[stderr] /app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/java/host/exp/exponent/generated/AppConstants.java:8: error: package expo.modules.splashscreen does not exist
[stderr] import expo.modules.splashscreen.SplashScreenImageResizeMode;
[stderr] ^
[stderr] /app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/java/host/exp/exponent/generated/AppConstants.java:25: error: cannot find symbol
[stderr] public static SplashScreenImageResizeMode SPLASH_SCREEN_IMAGE_RESIZE_MODE = SplashScreenImageResizeMode.CONTAIN;
[stderr] ^
[stderr] symbol: class SplashScreenImageResizeMode
[stderr] location: class AppConstants
[stderr] /app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/java/host/exp/exponent/generated/AppConstants.java:25: error: cannot find symbol
[stderr] public static SplashScreenImageResizeMode SPLASH_SCREEN_IMAGE_RESIZE_MODE = SplashScreenImageResizeMode.CONTAIN;
[stderr] ^
[stderr] symbol: variable SplashScreenImageResizeMode
[stderr] location: class AppConstants
[stderr] /app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/java/host/exp/exponent/generated/AppConstants.java:53: error: cannot access SplashScreenImageResizeMode
[stderr] constants.SPLASH_SCREEN_IMAGE_RESIZE_MODE = SPLASH_SCREEN_IMAGE_RESIZE_MODE;
[stderr] ^
[stderr] class file for expo.modules.splashscreen.SplashScreenImageResizeMode not found
[stderr] 4 errors
> Task :app:compileReleaseJavaWithJavac FAILED
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:compileReleaseJavaWithJavac'.
[stderr] > Compilation failed; see the compiler error output for details.
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 35s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
Here's my app.json
{
"expo": {
"name": "APP_NAME",
"slug": "APP_SLUG",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.1",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "BUNDLE_IDENTIFIER"
},
"android": {
"package": "APP_PACKAGE",
"softwareKeyboardLayoutMode": "pan",
"versionCode": 1,
"permissions": [
"CAMERA"
],
"enableDangerousExperimentalLeanBuilds": true
}
}
}
The builds were successful with the older SDK version, but few packages were not compatible with the older SDK, hence I had to upgrade it to the latest. The application is running perfectly fine in the expo go mobile application, but unable to build a standalone app.
How to solve this problem? Or, is it possible to downgrade from SDK 41 to 40 or 39? Any suggestions or recommendation is appreciated.
There are two major reasons for this cause.
Setting enableDangerousExperimentalLeanBuils to true.
Missing expo-splash-screen package.
The error is because it's(Gradle build) looking for expo-modules-splashscreen package, which is supposedly moved out of expo's main module in SDK 41, hence needs to be separately installed.
In order to fix this, there are two workarounds:
Remove enableDangerousExperimentalLeanBuilds property. (Not tested)
Install expo-splash-screen using npm install expo-splash-screen.(Tested and working)
I'm trying call DrawImage() on my code, I'm following this tutorial
Jetpack Tutorial,
But I'm getting this error.:
Unresolved reference: DrawImage
I tried implement on build.gradle, this lib.:
implementation 'androidx.ui:ui-foundation:0.1.0-dev04'
But I getting this error.:
Executing tasks: [clean, :app:assembleDebug] in project
C:\Users\samue\Desktop\Projetos Kotlin\first-jetpack
Task :clean
Task :app:clean
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :app:compileDebugAidl NO-SOURCE
Task :app:generateDebugBuildConfig
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:prepareDebugKotlinCompileTask
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:createDebugCompatibleScreenManifests
Task :app:extractDeepLinksDebug
Task :app:processDebugManifest
Task :app:mergeDebugResources
Task :app:processDebugResources
Task :app:compileDebugKotlin FAILED w: ATTENTION! This build uses unsafe internal compiler arguments:
-XXLanguage:+NonParenthesizedAnnotationsOnFunctionalTypes
This mode is not recommended for production use, as no
stability/compatibility guarantees are given on compiler or generated
code. Use it at your own risk!
e: java.lang.IllegalStateException: Backend Internal error: Exception
during code generation Element is unknownThe root cause
java.util.NoSuchElementException was thrown at:
androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.irComposableExpr(ComposableCallTransformer.kt:1362)
at
org.jetbrains.kotlin.codegen.CompilationErrorHandler.lambda$static$0(CompilationErrorHandler.java:35)
at
org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:93)
at
org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm$default(JvmBackendFacade.kt:64)
at
org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:52)
at
org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.generateModule(JvmIrCodegenFactory.kt:36)
at
org.jetbrains.kotlin.codegen.KotlinCodegenFacade.doGenerateFiles(KotlinCodegenFacade.java:47)
at
org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:39)
at
org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:638)
at
org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:198)
at
org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:172)
at
org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:56)
at
org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:85)
at
org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:43)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:104) at
org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:349)
at
org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:105)
at
org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:237)
at
org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.access$compileIncrementally(IncrementalCompilerRunner.kt:37)
at
org.jetbrains.kotlin.incremental.IncrementalCompilerRunner$compile$2.invoke(IncrementalCompilerRunner.kt:79)
at
org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:91)
at
org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:606)
at
org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:99)
at
org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1645)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at sun.rmi.transport.Transport$1.run(Transport.java:200) at
sun.rmi.transport.Transport$1.run(Transport.java:197) at
java.security.AccessController.doPrivileged(Native Method) at
sun.rmi.transport.Transport.serviceCall(Transport.java:196) at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
at java.security.AccessController.doPrivileged(Native Method) at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748) Caused by:
java.util.NoSuchElementException: Collection contains no element
matching the predicate. at
androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.irComposableExpr(ComposableCallTransformer.kt:1362)
at
androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.visitBlock(ComposableCallTransformer.kt:252)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlock(IrElementTransformerVoid.kt:128)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlock(IrElementTransformerVoid.kt:24)
at
org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl.accept(IrBlockImpl.kt:52)
at
org.jetbrains.kotlin.ir.expressions.IrExpression$DefaultImpls.transform(IrExpression.kt:28)
at
org.jetbrains.kotlin.ir.expressions.impl.IrExpressionBase.transform(IrExpressionBase.kt:24)
at
org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl.transformChildren(IrVariableImpl.kt:93)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:288)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildrenVoid(IrElementTransformerVoid.kt:283)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildren(IrElementTransformerVoid.kt:25)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:46)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:87)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:88)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitVariable(IrElementTransformerVoid.kt:24)
at
org.jetbrains.kotlin.ir.declarations.impl.IrVariableImpl.accept(IrVariableImpl.kt:86)
at
org.jetbrains.kotlin.ir.declarations.IrDeclaration$DefaultImpls.transform(IrDeclaration.kt:42)
at
org.jetbrains.kotlin.ir.declarations.impl.IrDeclarationBase.transform(IrDeclarationBase.kt:27)
at
org.jetbrains.kotlin.ir.expressions.impl.IrBlockBodyImpl.transformChildren(IrBlockBodyImpl.kt:49)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:288)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildrenVoid(IrElementTransformerVoid.kt:283)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildren(IrElementTransformerVoid.kt:25)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBody(IrElementTransformerVoid.kt:93)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:99)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:100)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitBlockBody(IrElementTransformerVoid.kt:24)
at
org.jetbrains.kotlin.ir.expressions.impl.IrBlockBodyImpl.accept(IrBlockBodyImpl.kt:40)
at
org.jetbrains.kotlin.ir.expressions.IrBody$DefaultImpls.transform(IrBody.kt:24)
at
org.jetbrains.kotlin.ir.expressions.IrBlockBody$DefaultImpls.transform(IrBody.kt)
at
org.jetbrains.kotlin.ir.expressions.impl.IrBlockBodyImpl.transform(IrBlockBodyImpl.kt:26)
at
org.jetbrains.kotlin.ir.declarations.impl.IrFunctionBase.transformChildren(IrFunctionBase.kt:77)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:288)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildrenVoid(IrElementTransformerVoid.kt:283)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.transformChildren(IrElementTransformerVoid.kt:25)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:46)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFunction(IrElementTransformerVoid.kt:55)
at
androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.visitFunction(ComposableCallTransformer.kt:205)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:58)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:59)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:24)
at
org.jetbrains.kotlin.ir.declarations.impl.IrFunctionImpl.accept(IrFunctionImpl.kt:89)
at
org.jetbrains.kotlin.ir.declarations.IrDeclaration$DefaultImpls.transform(IrDeclaration.kt:42)
at
org.jetbrains.kotlin.ir.declarations.impl.IrDeclarationBase.transform(IrDeclarationBase.kt:27)
at
org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl.transformChildren(IrFileImpl.kt:71)
at
org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoidKt.transformChildrenVoid(IrElementTransformerVoid.kt:288)
at
androidx.compose.plugins.kotlin.compiler.lower.ComposableCallTransformer.lower(ComposableCallTransformer.kt:197)
at org.jetbrains.kotlin.backend.common.LowerKt.lower(Lower.kt:66) at
org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$makeIrModulePhase$1.invoke(PhaseBuilders.kt:235)
at
org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$makeIrModulePhase$1.invoke(PhaseBuilders.kt:228)
at
org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper$runBody$1.invoke(CompilerPhase.kt:128)
at
org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.downlevel(CompilerPhase.kt:24)
at
org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.runBody(CompilerPhase.kt:127)
at
org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.invoke(CompilerPhase.kt:105)
at
org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:29)
at
org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:42)
at org.jetbrains.kotlin.backend.jvm.JvmLower.lower(JvmLower.kt:288)
at
org.jetbrains.kotlin.backend.jvm.JvmBackendFacade.doGenerateFilesInternal$backend_jvm(JvmBackendFacade.kt:91)
... 38 more
Task :app:javaPreCompileDebug
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:compileDebugKotlin'.
Internal compiler error. See log for more details
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 15s 12 actionable tasks: 12 executed
Can someone help me with this issue?
In your module's build.gradle file, make sure that you have this in your android closure:
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerVersion "1.3.61-dev-withExperimentalGoogleExtensions-20200129"
kotlinCompilerExtensionVersion "0.1.0-dev04"
}
My guess is that you are missing the composeOptions.
DrawImage() is part of androidx.ui:ui-foundation.
Open the build.gradle (Module: app) file and add the following line to the list of dependencies:
dependencies {
...
implementation 'androidx.ui:ui-foundation:0.1.0-dev03'
}
I would recommend following Jetpack Compose Basics - Codelab, a more comprehensive tutorial by Google.
You can see the latest composeOptions for the correct build here.
But keep in mind that the library API can vary greatly from version to version, and it would be better to take a look at the official example to examine the use of the Compose library.
Don't forget to switch the repository to the right branch corresponding to the latest version of the library (for example, at the time of the answer it's dev05 branch).
I have to setup a job on Jenkins to build an Android Application. I have also a SonarQube server which is accessible at http://x.x.x.198/sonar.
I added a shell script that will be called to launch sonarqube analysis on the project.
SonarQube server and Jenkins run on different server, and I can access to the SonarQube host from Jenkins machine.
The build failed and here is the console output:
./gradlew sonarqube --stacktrace -Dsonar.url.host=http://x.x.x.198/sonar
Parallel execution with configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:sonarqubeSonarQube server [http://x.x.x.198/sonar] can not be reached
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:sonarqube'.
> Unable to execute SonarQube
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:sonarqube'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:84)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:71)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:71)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:67)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:218)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:156)
at org.sonarqube.gradle.SonarQubeTask.run(SonarQubeTask.java:83)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:227)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 14 more
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:93)
at org.sonarsource.scanner.api.internal.Jars.download(Jars.java:70)
at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:39)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:75)
... 28 more
Caused by: java.lang.IllegalStateException: Status returned by url [http://10.133.64.198/sonar/batch_bootstrap/index] is not valid: [403]
at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:116)
at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99)
at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:78)
... 31 more
BUILD FAILED
Total time: 1.632 secs
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Has anyone already faced this problem? Need help :|
Thanks in advance.
Finaly found why it doesn't work. In my gradle.properties, i had specified some proxy properties. I have removed these entries (host, port, login, password, ...) so when sonarqube task is called, gradle does not use any proxy to access the SonarQube server. The task finished successfully on Jenkins and analysis reports uploaded to sonarqube server :).
This post helped me Sonarqube grade build failed with "SonarQube server [http://x.12.11.18:9000] can not be reached"
Hope this will help others.
2.7.1 is not back-compatible. Lock your plugin version to 2.6 in your pom.xml or upgrade your SonarQube
Workaround: Adding -Dsonar.host.url=http://my.server:9000 to mvn command works for me
Better than disabling the plugin, you may fix the plugin version to
2.6, which works fine, taking into account sonar.host.url.
For instance, with Maven in my case:
<pluginManagement>
</plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>2.6</version>
<!-- sonar.host.url not working with version 2.7 -->
</plugin>
</plugins>
</pluginManagement>