When I previously released my application it went well, but now I try to upload a new version of my application and Google Play says that it has some java/kotlin code in it and asks for me to upload an deobfuscation txt file. I have been looking for answers and the people mention a "mapping.txt" file which android studio creates when you are using proguard or R8 code shrinkers.
Does anyone know where I can generate such file or where it may be?
Note: I haven't added or upgraded any nuget packages since the last time I updated the application and I already looked in the bin/obj folders with no luck. Also I checked the archive folder that creates when I bundle the application.
The obfuscation step of ProGuard is disabled when building a Xamarin Android application. Therefore, there's no deobfuscation file generated and no need to upload one. You can ignore the warning.
From the Xamarin.Android documentation:
The Xamarin.Android ProGuard configuration does not obfuscate the APK. In fact, it is not possible to enable obfuscation through ProGuard (even through the use of custom configuration files).
Edit: There is currently an open PR in Xamarin.Android to have ProGuard generate the mapping.txt file. Note that this is only to silence the warning, though. In theory, it's not needed.
Related
I am using Visual Studio For Mac. My Xamarin Forms project is quite large and contains many content pages. Some of them will be only used in android project and some of them only used in iOS project. There is no problem when I compile the project into android. However, when I want to compile the project into iOS, it seems like did not accept anything related to android. Please refer to the screenshot. There is no way I can include the android specialised reference and compile into iOS project. So, any idea to deal with this? Maybe there is a way to force build the iOS project no matter what? The error from the screenshot is from the page that will be only used in android. So what I can do for now is delete the page when I want to compile as iOS and recreate the page when I want to used it for android. But there are plenty of them, it is too heavy for me to do this every time. Please help.
You can't call platform specific APIs at the .NET standard libraries that are used to host Xamarin.Forms code by default.
Basically you have those options:
1) using shared project instead of library and using conditional compiling (easier but it is now not available as the option when creating the project)
2) using dependency injection.
I have installed cordova-plugin-firebase.
In the root folder of my app I have zipped www folder, config.xml, google-services.json and GoogleService-Info.plist.
I use this file in phonegap build and it builds fine for ios.
I have installed the app in a iPhone 7, but when I run the app it crashes.
In the plugin page I can read (https://www.npmjs.com/package/cordova-plugin-firebase#important-notes):
"IMPORTANT NOTES
This plugin uses a hook (after prepare) that copies the configuration
files to the right place, namely platforms/ios/\/Resources for ios and platforms/android for android.
Firebase SDK requires the configuration files to be present and valid,
otherwise your app will crash on boot or Firebase features won't work.
PhoneGap Build
Hooks does not work with PhoneGap Build. This means you will have to
manually make sure the configuration files are included. One way to do
that is to make a private fork of this plugin and replace the
placeholder config files (see src/ios and src/android) with your
actual ones, as well as hard coding your app id and api key in
plugin.xml."
So I think what is happening is that GoogleService-Info.plist and google-services.json are not placed in the right place.
But, how can I fix this? I don't understand the solution about making a private fork?!?
Any help?
Thanks
I answer myself.
Because of hooks doesn't work in phonegap build I have installed Xcode and Android Studio.
Now the plugin is working in android, but not ios.
I will post a question for this.
I'm using Unity 5. It still expects java plugins to be a .jar file built with JDK 1.6.
I had this working under Unity 4, but they changed something. Now I get this error while building the apk from Unity:
OBSOLETE - Providing Android resources in Assets/Plugins/Android/res
is deprecated, please move your resources to an Android Library. See
"Building Plugins for Android" section of the Manual.
How do I get AS to put the resources into classes.jar? The "Building Plugins for Android" doesn't mention resources.
Additional information about my project:
The project references Google Play Services, so I need version.xml in there
<integer name="google_play_services_version">6587000</integer>
Which contains the version number for the reference in the Manifest.
<meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
But if I include this file in res/values in my AS library project, it's still output as an xml file in res/values next to the classes.jar.
Incidentally, I'm digging the .jar file out of
/ApplicationName/build/intermediates/exploded-aar/ProjectName/LibararyName/unspecified/classes.jar
after building the project.
First of all, this is a warning and not an error.
Providing resources in Unity in Assets/Plugins/Android/res/ folder is not recommended, because it can cause resource conflicts.
When you provide resources in an Android library, they are correctly merged during build process.
Basically, you have three options:
convert your plugin into an Android library. Or you can init an empty library, add your .jar file to bin/, your resources to res/ (there should be a manifest and android.library=true in project.properties). You can do this by calling android create lib-project (more details)
if you compile your plugin directly using gradle or in Android Studio, you can use .aar file produced, given that you have set your project up as a library (apply plugin: 'com.android.library' in your build.gradle file). Just put it in any folder of your project, it should automatically be detected as Android-only plugin.
continue providing resources in res/ and wait for it to be completely unsupported by Unity.
Hope this helps.
I have a project is working for android browser. Is there a way to generate the apk file?
Also, are there anything that I shoud know before generating the apk file?
There are a few steps to follow in order to generate the Android application file (.apk) from a meteor app:
meteor install-sdk android
Have the mobile-config.js file in your project root (mobile-config.js example)
meteor add-platform android
meteor build ~/your-output-dir --server=yourapp.meteor.com
Then you will have your .apk file in ~/your-output-dir/android/unaligned.apk
If you want to proceed and submit to Google Play Store, here are the steps to follow: https://guide.meteor.com/mobile.html#submitting-android
Hope this helps!
You can build an APK file with meteor build command.
Read more about it in the docs: http://docs.meteor.com/#/full/meteorbuild or by typing meteor help build in your terminal.
Starting with Meteor 1.2, the bundled Android tools have been removed and a system-wide install of the Android SDK is now required. This should make it easier to keep the development toolchain up to date and helps avoid some difficult to diagnose failures. The meteor install-sdk command no longer attempts to download and install the Android tools for you (it has been deprecated and just points you to these instructions).
like imslavko says, meteor build works pretty fine, also if you are looking for more information take a look on this Meteorpedia
It work for me
Reegards
As of now playstore has started giving warning while uploading APK about unoptimised bundle and insisting for uploading Android app bundle.
Insted of generating APK why not generate .aab of your project and reduce size of the application.
For people wondering about how to generate .aab for your existing project can read my blog here:
My blog link
Recently tried the plugin example of Qt.
It didn't work at all and I was confused as to the reason. Then found the solution on one of the forums.
Qt, Application and plugin all three have to be built with the same configuration (Release/Debug)
This works for me as I can build all three in Debug/Release mode. But if I want users to extend my application using plugins I need to provide debug build of my application. (If I provide release build, users will not be able to trouble-shoot the plugin). Qt source is available so it can be built in any mode.
I don't want to provide debug build of my application to users. Is there any work around for this restriction on build mode for plugins?
P.S. I understand users can debug with logging statements, but not sure how many prefer that approach.
This is because Qt has a so called build key which is just a string containing some Qt configuration information, this is documented in the Qt plugin Howto.
So you should just go ahead and provide a debug build of your application for the best results.
You can build debug version (to have compiled in debug configuration) and strip it out of all symbols etc.