Closed AlexOConnorHub closed 1 year ago
there's a version mismatch with your android gradle and kotlin.
you can solve it in a few steps:
in your home directory, delete your .gradle folder to start with a clean cache
cd ~
rm -rf .gradle
in your project directory, delete your android folder
rm -rf android
in your project directory, update your app.json to use kotlinVersion 1.8.10:
{
"expo": {
"name": "example",
"slug": "example",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.spencerkam.example"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"package": "com.spencerkam.example"
},
"web": {
"favicon": "./assets/favicon.png"
},
"plugins": [
[
"expo-build-properties",
{
"android": {
"kotlinVersion": "1.8.10",
"compileSdkVersion": 33,
"targetSdkVersion": 33,
"packagingOptions": {
"pickFirst": ["**/libc++_shared.so"]
}
},
"ios": {
"extraPods": [
{
"name": "simdjson",
"path": "../node_modules/@nozbe/simdjson",
"modular_headers": true
}
]
}
}
],
"@skam22/watermelondb-expo-plugin"
]
}
}
in your project directory, remove the node_modules folder:
rm -rf node_modules
in your project directory, rebuild the dev client:
yarn && yarn android
I updated the example app to show you what it should look like.
there's a version mismatch with your android gradle and kotlin.
you can solve it in a few steps:
- In your home directory, delete your .gradle folder to start with a clean cache
- In your project directory, delete your android folder
- In your project directory, update your app.json to use kotlinVersion 1.8.10:
{ "expo": { "plugins": [ [ "expo-build-properties", { "android": { "kotlinVersion": "1.8.10", } } ] ] } }
Awesome, thank you so much for pointing out where I went wrong, and being responsive so quickly! Above is a shortened version of your answer. If you wanted to copy/paste it into StackOverflow, I'll accept your answer. In case someone else runs into the same problem I have, I don't want them to dead end on StackOverflow site with an answer referencing another site without a link.
I posted this issue on stack overflow but no one has answered yet. If this is an user error, then feel free to answer there for a few points. The errors I'm getting are after this paragraph. I have restarted the server, and am running
npx expo start
from the root directory of the app.If I use
npx expo run:android
, I get a long list of errors consisting ofThe binary version of its metadata is 1.8.0, expected version is 1.6.0.
and someUnresolved reference
lines.Steps I've taken:
config.resolver...
line is for that). ChatGPT recommended testing without that line, and it also failed with the same error message.