4

I am doing android app in meteor. Its in development stage. I just tried to build apk for testing purpose. But when I try to install apk file, device says "Application not installed". I tried the following steps.

meteor build ../build --server 192.168.0.5:3000

The above command generate unaligned.apk file in android directory and CordovaApp-release-unsigned.apk in android/project/ant-build directory. Both apk says "Application not installed". So I add following lines

App.info({
  name: 'My App',
  description: 'An Android app built with Meteor',
  version: '0.0.1'
});

in mobile-config.js in app root directory. But Again I got the same issue "Application not installed".

Is anything wrong in my steps? Why APK is not installed? How to build right apk with meteor?

Ramesh Murugesan
  • 4,727
  • 7
  • 42
  • 67

3 Answers3

9

Let me answer my question. It works fine for me.

Build APK by

meteor build ~/build-output-directory \
    --server=your-desired-app-hostname.meteor.com

Now you can sign your app by

keytool -genkey -alias your-app-name -keyalg RSA \
    -keysize 2048 -validity 10000

cd ~/build-output-directory/android/
jarsigner -digestalg SHA1 unaligned.apk your-app-name

After signed I can able to install and share my apk file. More detail from meteor.

Ramesh Murugesan
  • 4,727
  • 7
  • 42
  • 67
2

Looks like there is a bug in meteor. You should sign in your application. Please, check the following thread: Meteor cordova on Android building app

Community
  • 1
  • 1
Nickolai Astashonok
  • 2,878
  • 3
  • 20
  • 23
0

I see there is an accepted answer but maybe anyone with my problem will find this useful:

I had the same "App not Installed" error even though I was 100% sure that app is signed and zipalined. Then I tried to install the app through adb:

$ adb install my_app.apk
Error: [INSTALL_FAILED_UPDATE_INCOMPATIBLE]

Then I realised that probably my app was not deleted properly from my phone so I uninstalled it with adb (since I was unable to uninstal using the phone GUI) and it worked :)

$adb uninstall com.my_app.id

Hope this helps someone.