Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropping .apk in Android Studio plugin for Beta distribution issue #7

Closed
Tomsons opened this issue Jul 11, 2016 · 6 comments
Closed

Comments

@Tomsons
Copy link

Tomsons commented Jul 11, 2016

Hello,

just followed your instructions step by step. Everything's working as expected, Crashlytics issue reporting works as expected. The only issue I'm getting is the following:

When I try to drop the generated .apk into the Android Studio Fabric plugin in order to distribute it through Beta I'm getting this error:

Unable to extract Crashlytics build info from the dropped APK. Please make sure your Crashlytics build tool plugin is installed and enabled.

As I don't get any kind of logs, do you may have any clue how to solve this issue?

@Tomsons
Copy link
Author

Tomsons commented Jul 11, 2016

OK Just got it. For those who are getting stuck on it. After several hours, just found out what I have to do in order to distribute the app through Android Studio Fabric Plugin.

You'll have to copy the assets/crashlytics-build.properties file generated within your native helper application skeleton and paste it into the Assets folder of your Xamarin project. Don't forget to mark this file as AndroidAsset in its build actions.

Create your archive for distribution and simply drop your brand new generated apk into Android Studio and that's it.

GL & HF

@drungrin
Copy link
Owner

drungrin commented Jul 11, 2016

Thanks for sharing the solution.

I didn't used Beta, Good to know that it also works.

I'll include that gotcha on the readme.

@brittonbeckham
Copy link

brittonbeckham commented Aug 12, 2016

FYI everyone, on this I just found out the hard way that for each new beta build you must do a series of tasks:

  1. Go to Android Studio, update the build version name and version code in the project settings
  2. Build project in Android Studio
  3. A new crashlytics-build.properties file will be generated in your android project with unique buid_id
  4. Copy the contents of this file and overwrite the one in your Xamarin.Forms Android project
  5. Rebuild your solution in Visual Studio (in Release)
  6. Export .apk
  7. Drag the newly generated .apk back into the Fabric.io plugin in Android Studio

@franckbrun
Copy link

Hi all,
The "Fabric Ant build tools" contains a jar file crashlytics-devtools.jar which can be used in a script to generate all crahslytics files "crashlytics-build.properties" and the special xml file in res/values.

Then you can use fastlane to submit the signed-zipaligned APK file. No need to use Android studio anymore.

Just one problem for me now (I don't think it is linked with this solution) but even the submitted APK is signed and zipaligned, the APK downloaded by the "Beta Crachlytics App" can be installed but not launched because all the Dll files in the "assemblies" folder are not zipaligned anymore.
The same problem appear with the "Android Studio Drop APK" solution.
Has anybody this problem ?

@jkells
Copy link

jkells commented May 2, 2017

Hi @franckbrun did you make any progress on this? I'm seeing the zipalign problem now too.

@vigoou
Copy link

vigoou commented Feb 8, 2018

@Tomsons thanks for this solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants