Skip to content
Back to journal
Source BuildFlutterAndroidAPK

How to Make an APK From a ZIP File: Check What's Inside

CCode2Native EngineeringEngineering team
Published

Have a Flutter or native Android project? Code2Native compiles it in the cloud from a ZIP or a Git repository, on Builder ($39/month) or Pro ($99/month).

Start a source build

A ZIP file becomes an APK only if it contains a mobile app project: the source code plus the build files that tell Gradle, Flutter or React Native how to compile it. A ZIP of web code, like most exports from AI app builders, cannot be compiled into an APK directly; host it first, then wrap the hosted URL. Here is how to tell which one you have in 30 seconds.

What is inside your ZIP?

Unzip it and look at the top level, or the single folder right under it:

If you seeIt isHow it becomes an APK
pubspec.yaml, lib/, usually android/A Flutter projectCompile it: flutter build, locally or in a cloud build
settings.gradle, build.gradle, app/, gradlewA native Android projectCompile it with Gradle
package.json listing react-native, expo or @capacitorA React Native, Expo or Capacitor appCompile it with that framework's tools (see below)
Any other package.json with src/, or index.htmlA web app or websiteHost it, then wrap the URL

Exports from Google AI Studio, Lovable and Bolt are usually the last kind: a web app. Renaming the ZIP to .apk or running it through a file converter produces a file Android cannot install.

A Flutter or Android project: compile it

Locally, that means installing the Flutter SDK or Android Studio, the Android SDK and a matching JDK, then running flutter build apk --release or ./gradlew assembleRelease. If you do not want to maintain that toolchain, upload the ZIP to a cloud build:

  1. Put the project at the ZIP's root, or inside one top-level folder.
  2. Leave out generated folders such as build/, .dart_tool/ and node_modules/, and never include signing keys or server credentials. Keep the lockfile and every asset the project references.
  3. Choose an APK to install directly, or an AAB for Google Play, and read the real build log.

On Code2Native, ZIP and Git compiles need Builder ($39/month, up to 20 Android source compiles a month, using included credits) or Pro. The archive is checked before any credit is charged, and an incomplete project is refused with the reason. React Native, Expo and Capacitor projects are not supported. See how to prepare a source build and building a Flutter APK online.

A web app: host it, then wrap the URL

A web export needs a server or static host before any app can show it: Vercel, Netlify, Firebase Hosting or Cloud Run all work, and some builders deploy for you. Once it is live at an HTTPS address, wrapping it gives you an Android APK or AAB that opens that address in a native shell. Paste the URL into the free website-to-app preview to see it in a phone frame first. For Google AI Studio exports specifically, see getting an APK from Google AI Studio.

A React Native, Expo or Capacitor app: use its own tools

Expo projects build with Expo Application Services (EAS) in the cloud, or locally with npx expo prebuild followed by a Gradle build. Bare React Native projects build from their android/ folder with Gradle after npm install, and Capacitor projects after npx cap sync android. Code2Native compiles Flutter and native Android projects only, so do not upload these; if the app is also deployed on the web, its URL can be wrapped instead.

APK or AAB, and who signs it

An APK installs directly on a phone; Google Play takes an AAB. Both must be signed, and the key matters: Android only accepts an update signed with the same key as the installed app, and Play only accepts updates signed with your upload key. If you upload your own keystore, Code2Native signs with it; otherwise each source project gets a key of its own, and its later builds keep using it.

Compile your project in the cloud

Upload a ZIP or give a Git URL, choose APK or AAB, and read the real build log. Builder covers up to 20 Android source compiles a month, using its included credits. Check that your project is supported before you buy.

Frequently asked questions

Can any ZIP file be converted into an APK?

No. An APK is compiled from a mobile app project: Flutter, native Android, React Native, Expo or Capacitor. If the ZIP holds one, it can be built into an APK or AAB. If it holds a website or a web app's source, the site has to be hosted first; then the hosted URL can be wrapped into an Android app.

My AI builder gave me a ZIP. Which kind is it?

Open it and look at the top level. pubspec.yaml means Flutter; settings.gradle and an app folder mean a native Android project. If there is a package.json, check its dependencies first: react-native or expo means a React Native app, @capacitor means a Capacitor app; otherwise, with a src folder or an index.html, it is a web app. Google AI Studio, Lovable and Bolt exports are usually web apps.

Is building from a ZIP free?

Source compiles need Builder ($39/month, up to 20 Android source compiles a month, using included credits) or Pro ($99/month). Wrapping a hosted website starts free: Build one Preview APK with a Code2Native watermark. No card required.

What if the ZIP is not a complete project?

Code2Native checks the archive before any credit is charged, and refuses an upload that is not a complete Flutter or Android project with the reason, such as a missing settings.gradle or a lone gradlew script. React Native, Expo and Capacitor projects are not supported, so do not upload them.

C

Code2Native Engineering

Engineering team

Written by the Code2Native engineering team — the people who build and operate the cloud build pipeline.