Reputation: 15
After transferring the project, I get an error while compiling, before that there wasn’t such a thing, what could be the matter?
UPDATE
Build output:
> Task :clean UP-TO-DATE
> Task :app:clean
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:checkDebugManifest
> Task :app:generateDebugBuildConfig
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:mainApkListPersistenceDebug
> Task :app:javaPreCompileDebug
> Task :app:generateDebugResValues
> Task :app:generateDebugResources
> Task :app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> -1
* 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 2s
8 actionable tasks: 7 executed, 1 up-to-date
The build scan was not published due to a configuration problem.
The Gradle Terms of Service have not been agreed to.
For more information, please see https://gradle.com/scans/help/plugin-terms-of-service.
Alternatively, if you are using Gradle Enterprise, specify the server location.
For more information, please see https://gradle.com/scans/help/plugin-enterprise-config.
What is this?
Upvotes: 0
Views: 3725
Reputation: 1
e: This version (1.4.3) of the Compose Compiler requires Kotlin version 1.8.10 but you appear to be using Kotlin version 1.9.0 which is not known to be compatible. Please consult the Compose-Kotlin compatibility map located at https://developer.android.com/jetpack/androidx/releases/compose-kotlin to choose a compatible version pair (or suppressKotlinVersionCompatibilityCheck
but don't say I didn't warn you!).
Upvotes: 0
Reputation: 76424
Compilation errors are thrown while you are compiling, however, the actual error that you get is ArrayIndexOutOfBoundsException, which looks like a runtime exception and not a compile error. It means that your project attempts to refer to an array item using an index which does not exist.
You can fix this error via making sure that you do not try to refer elements at indexes beyond or below the limits of your array and if you fail to find where this is thrown (the full error message if helpful for this purpose) then you can debug and narrow down the problem-space until you find the line where it is crashing.
Upvotes: 1