Exp detach Android; No config file specified.


#1

Hi! When detaching my project via exp detach I get a “No config file specified” warning (See below).
As a result of this, the generated Android file seems to be incorrect.
When detaching I have tried: “exp detach”, and “exp detach --config ‘./app.json’” and both yielded the same result.
My app.json is as follows:

{
  "expo": {
    "name": "BarcodeProcessor",
    "sdkVersion": "27.0.0",
    "version": "1.0.0",
    "slug": "Barcode-Processor",
    "description": "Reads 2D Barcodes and inserts the respective data into an SQL database",
    "orientation": "portrait",
    "ios": {
      "bundleIdentifier": "com.MyCompany.BarcodeProcessor"
    },
    "android": {
      "package": "com.MyCompany.BarcodeProcessor"
    }
  }
}


#2

That’s just a warning, it should be fine. Can you please give more information about what this means?

As a result of this, the generated Android file seems to be incorrect.


#3

Hey sorry for the delay, what I mean by this is there is no android project created using the package name I specified (See folder layout below). I’ve never had to detach before so what’s confusing me is where I would place my java file to use as a native module. Would I create a new android studio project under src/main/java or would I place it somewhere in the already specified host/exp/exponent project?


#4

Hey @michaelpanunto, that file layout is expected. The package name for the application is set in app/build.gradle.

I’ve never had to detach before so what’s confusing me is where I would place my java file to use as a native module.

Doesn’t really matter. You can create a new package if you want or put your files in the host.exp.exponent package.


#5

Ah I see, all the guides I was using as reference seemed to be structured differently and never really went over it. Thanks for clearing that up!


#6

What guides were you using? Were they in our docs?


#7

Not from the docs, articles online regarding adding native modules to an app after detaching. I did look through the docs about detaching and it was quite helpful, I just never noticed any mention about what the structure should look like in them.

Honestly, I think this was mainly me confusing myself since it is a little different from what I’m used to.

Thanks for all your help


#8

Ok thanks!