Gradle Sync Error after migration to Android X - android

Gradle sync is failing with msg
Error: cause: java/nio/channels/FileChannel$MapMode
java.lang.NoClassDefFoundError: java/nio/channels/FileChannel$MapMode
I have migrated to Android x and updated Android studio to 3.4. That being done I got this error.
Is there any solution to resolve the error? I haven't find anything useful on web yet.

Related

React Native - :expo-modules-core:compileDebugKotlin error [duplicate]

This question already has answers here:
React Native Android build failure with different errors without any changes in code for past days due to publish of React Native version 0.71.0-rc.0
(4 answers)
Closed 4 months ago.
For some reason, Im getting this issue (build was working fine yesterday):
When I run npx react-native run-android
Im getting:
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Execution failed for task ':expo-modules-core:compileDebugKotlin'.
In terminal im also seeing this:
Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.
I've seen some solutions online like this. So iv added the kotlin version 1.4.1 and im getting this error when I gun gradle clean:
* What went wrong:
A problem occurred configuring root project 'ProjectName'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.1/kotlin-gradle-plugin-1.4.1.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.1/kotlin-gradle-plugin-1.4.1.pom
- https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4.1/kotlin-gradle-plugin-1.4.1.pom
Required by:
project :
Not sure why this build has started failing. any ideas?
Check out
https://github.com/facebook/react-native/issues/35210
On November 4th 2022 a new React Native version got published which is causing some build issues.
This event resulted in build failures for Android on several users as they ended up downloading the wrong React Native version (0.71.0-rc0 instead of the version they were using in their project, say 0.68.0).
have you initiated your projects with "expo init" command or by using npx?

Error while compiling multidex library after updating SDK

I am pretty new to Android Studio.
I have converted my Eclipse project to Android Studio successfully. everything worked fine, until today I updated my SDK and suddenly it started giving me error
> Error: A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.android.support:multidex:1.0.1.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/multidex/1.0.1/multidex-1.0.1.pom
https://jcenter.bintray.com/com/android/support/multidex/1.0.1/multidex-1.0.1.jar
https://jitpack.io/com/android/support/multidex/1.0.1/multidex-1.0.1.pom
https://jitpack.io/com/android/support/multidex/1.0.1/multidex-1.0.1.jar
file:/C:/Users/as/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/multidex/1.0.1/multidex-1.0.1.pom
file:/C:/Users/as/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/multidex/1.0.1/multidex-1.0.1.jar
file:/C:/Users/as/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/multidex/1.0.1/multidex-1.0.1.pom
file:/C:/Users/as/AppData/Local/Android/sdk/extras/google/m2repository/com/android/support/multidex/1.0.1/multidex-1.0.1.jar
Required by:
ElalaSeller:app:unspecified
when I rebuild my project. it says
Error:(25, 13) Failed to resolve: com.android.support:multidex:1.0.1
Install Repository and sync project
Show in File
Show in Project Structure dialog
I checked Android support repository is installed.
Any help will be appreciated.
Thank you.
Update : I have checked this Question. most upvoted answer says install Android Support Repository. but in my case i already have installed it. you can see in screenshot i have uploaded. but still getting same error.
I have cleaned my project but still no change.

Building after Android Studio 2.0 alpha5 upgrade gives FildNotFoundException for play-services8.1.0

After upgrading Android Studio 2.0 to preview 6, after all the sync, clean, rebuild, I am now getting this error:
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.> java.io.FileNotFoundException: /Applications/XAMPP/xamppfiles/htdocs/EPICEIRIE 2/app/build/intermediates/exploded-aar/com.google.android.gms/play-services/8.1.0/jars/classes.jar (No such file or directory)
I tried updating the SDK tools all to their most recent version, and even tried updating the play-services to 8.4.0, but no luck...
Does anyone else run into similar problem? Have you found a solution for it??
Try with Update your Gradle plugin to:
classpath 'com.android.tools.build:gradle:2.0.0-alpha6'

"android:TextAppearance.Material.Widget.Button.Inverse" in Android Studio 1.0.1

I am constantly getting error:
cannot resolve sumbol R.
I had used solution like clean,rebuild, sync with Gradle file. All of them not working.

Android Studio Setup- Displaying gradle sync error

I am getting Gradle sync error after installing the Android Studio.
It is displaying followinng errors :
Gradle 'Second' project refresh failed
Error:Artifact 'com.android.tools.build:gradle:0.12.2:gradle.jar' not found.
Please help me.
Snapshot :

Categories

Resources