2

I'm using expo-router and expo-sqlite to build an Android app with Expo. The build finishes successfully using eas build, but when I install and run the app (APK) on an emulator, the app shows only a blank white screen. The same code works fine in development (expo start).

Here’s a summary of my setup:

  • SQLite DB is opened using:
import * as SQLite from 'expo-sqlite';
export const db = SQLite.openDatabase('pastme.db');
  • I use expo-router for routing.
  • My metro.config.js is set up with aliasing for @ as project root.
  • tsconfig.json includes:
{
  "compilerOptions": {
    "paths": {
      "@/*": ["./*"]
    }
  }
}
  • My app.json includes the following plugins:
"plugins": [
  "expo-router",
  ["expo-splash-screen", { "image": "./assets/images/splash-icon.png", "resizeMode": "contain", "backgroundColor": "#ffffff" }],
  "expo-sqlite"
]

What I’ve tried:

  • Cleaned build cache with --clear-cache
  • Tried using expo-sqlite manually in a blank screen
  • Confirmed no crash logs
  • Made sure assets are bundled properly

Any idea why this is happening or what I may have missed?

Thanks in advance!

1
  • I am facing the same issue. The issue is very strange, the control doesn't even go into index.js for some reason. Commented May 8 at 9:59

1 Answer 1

0

I had the same issue in my app and solved it by adding the following in tsconfig.json.

"compilerOptions": {
    "strict": true,
    "paths": {
    },
    "types": ["expo", "expo-sqlite", "expo-file-system"]
  },
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.