I get the below error when I want to run my ionic app on android studio by using cmd -> ionic capacitor build android
Can teach me how to solve the below errors so that I can run my application on android studio?
Thank You.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':capacitor-android:compileDebugJavaWithJavac'.
> Failed to query the value of task ':capacitor-android: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, C:..node_modules@capacitorandroidcapacitorbuildgeneratedap_generated_sourcesdebugout)) org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer@2cce4302) before task ':capacitor-android: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
2
Answers
Issue solved by updating the Gradle in Android Studio.
You must set version of Compile Sdk Version and Builds tools Version in File -> Project Structure -> app . set the values and it build self.