0

After I've updated android project gradle version to 3.0.0 I've faced weird issue. When I'm trying to install my app with Fabric or send *.apk via email it says "App cant be installed" but when I work directly with IDE everything is fine.

I've already spent a lots of hours browsing all known gradle 3.0.0 issues, but didn found anything.

Maybe anybody faced similar issue?

P.S. sorry, there is no match code to share, because I think its not related on configurations, cause it works via Android Studio.

stkent
  • 19,772
  • 14
  • 85
  • 111
Jarik Eng
  • 310
  • 2
  • 10

2 Answers2

3

Maybe anybody faced similar issue?

Yes, and I blogged about it a couple of days ago.

If you are going to distribute the APK, build the APK explicitly for that role, such as:

  • Using the “Build APK(s)” menu option

  • Using the assembleDebug or assembleRelease Gradle tasks

The APK from an IDE build now has FLAG_TEST_ONLY set, and such an APK cannot be installed normally. adb install -t will install it, but that would require the recipient to have the Android SDK.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
0

Adding to CommonsWare answer, there is one more issue.

You might enabled Instant Run. One major drawback of this feature is, you can not use apk for other device (other than the device which you are using for development).

If so, after disabling this feature you will be able to use created apk (debug apk) to other device also (by using unknown sources option or adb option)

Pankaj Kumar
  • 81,967
  • 29
  • 167
  • 186