Expo Eject (of template project) Fails


#1

Having encountered a number of problems in establishing an ejected ExpoKit version of my project, I decided to strip back to the tutorial / template instructions to eliminate variables. I am unable to run my ejected project in Android studio. Here are the steps that I have followed:

npm install -g expo-cli
expo init MyEjectedProject (choosing expo-template-tabs)
cd MyEjectedProject
npm install
expo start

(verified that the project works)

Added the following to the app.json

"android": {
"package": "com.tomos.myejectedproject"
}

Expo eject (choosing ExpoKit)

Opened C:\Code\MyEjectedProject\android in Android Studio
Waited for Gradle sync to complete, ignoring the request to upgrade Gradle plugin.

expo start

Android Studio Run > Pixel 2 API 28

I then receive the following error within Android Studio:

Failed to delete: C:\Code\MyEjectedProject\android\app\build\generated\res\google-services\devKernel\debug


#2

Ok, I think I have a more specific problem statement here - if this triggers any thoughts amongst the community then I would welcome the input…

Having come across the following blog post…

…there seemed to be some similarity in the issues seen.

Specifically, the post suggests to update DEVELOPMENT_URL in:

Project\android\app\src\main\java\host\exp\exponent\generated\DetachBuildConstants.java

to avoid Expo continually crashing.

I tried this, with every variant of localhost / LAN urls that I could imagine, but could get expo-cli and Android Studio to co-exist on the same machine. Eventually, I set DEVELOPMENT_URL to the published project’s url:

https://exp.host/@tomosedplus/MyEjectedProject

…and then it works without crashing.

Obviously, to develop effectively, I need this url to be local. Is there something obviously wrong going on here?