Expo manifest.android.config missing in build apk - android

TypeError
undefined is not an object (evaluating 'f.default.manifest.android.config.googleMaps')
https://sentry.io/ error show me that key config are missing in my manifest in apk.
Any ideas how to fix it?
APK
DEV

https://github.com/expo/expo/issues/8781
I solved this by replacing Constants.manifest.android.config.googleMaps.apiKey call with my own small config json (or just string) in all project. On standalone apk Constants.manifest.android.config.googleMaps.apiKey - is not exists.
react-native-map works fine

Related

Exception 'Fingerprints didn't match.' when starting Android Xamarin.UITest

After updating my dev environment by installing some new android-sdk's and changing java versions, my xamarin.uitest project started failing to install the apk for testing.
The exception I am getting is "Fingerprints didn't match.", which based on the stack trace is being thrown by the method at
Xamarin.UITest.Shared.Android.AndroidTestServerFactory.BuildTestServer(ApkFile appApkFile, KeyStore keyStore, ArtifactFolder artifactFolder, Assembly sharedAssembly)
What do I need to do to resolve this?
The issue is regarding the dev keystore, which the uitest framework is using to sign the apk.
While I do not know the details, the solution I found was to remove the keystores from the uitest temp folder. For me, the location of this is temp directory was at C:\Users%username%\AppData\Local\Temp\uitest.
In the 'uitest' directory, there are multiple directories as shown:
What I did was removed the directories that started with 'a-', and after which was able to run the test successfully. This I assume created a new keystore.

Cordova Android app force closes after build

Here's the error details:
12-04 22:00:12.087: E/AndroidRuntime(19113):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.package.name.dev/com.package.name.dev.MainActivity}:
java.lang.NullPointerException: Attempt to invoke virtual method 'void
org.apache.cordova.CordovaPlugin.privateInitialize(java.lang.String,
org.apache.cordova.CordovaInterface,
org.apache.cordova.CordovaWebView,
org.apache.cordova.CordovaPreferences)' on a null object reference
Background: I was originally only building the app for Android, but during my last release I had to generate an iOS build as well, which required some extra plugins and configuration tweaks to get functional. Now I'm trying to create a new release for Android, but the new app force closes as soon as it is opened.
In an effort to fix it, I tried to remove all references to the iOS-only plugins from the Android side of the project, but the error persists. I'm not sure what else to try.
What would provoke Cordova to throw this error when initializing plugins?
The issue was that one of the plugins had failed to copy its java classes into the Android app src directory when it was installed. I created the appropriate directory hierarchy and then copied in the java files from the /plugins/ dir.
To figure out which plugin caused the issue, I disabled the onload param from each feature one at a time (in the android.json file in the android platform directory) until the app successfully opened.

How to use "mapping.txt" file for debug and error-exception handler for Release version in Android

I want to upload errors to the user in the app to the database server, but in the Release version, because it's used with Proguard, it does not correctly represent the classes that have encountered the error, as in the example Has been laid.
Sample error message
Attempt to write to field 'java.lang.String com.employe.school.Application.Message.c.c' on
a null object reference
Instead of "c.c", your actual class name will be displayed.
In general, I want to handle the App errors myself and do not use Firebase or other crash reporters.
Is there a way to solve this problem?
%SDK_DIR%\tools\proguard\bin\retrace mapping.txt errors.txt > fixed.txt
Do the work.
Android studio create mapping(build/outputs/mapping/release/mapping.txt) file under release folder for Release builds. You can use them to find out where the error is occured. Re-mapping is already implemented on Google Play Console and crashlytics. You just put mapping file with corresponding APK to play console and errors are shown correctly.

Fastlane screengrab not reading config

I'm starting to use screengrab to make automated screenshots of my app. I've a question regarding the "config" file named "Appfile".
Here is content:
json_key_file "" # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
app_package_name 'be.example.android.app'
app_apk_path 'app/build/outputs/apk/dev/debug/APP-DEV-debug-0.9.0.apk'
tests_apk_path 'app/build/outputs/apk/androidTest/dev/debug/app-dev-debug-androidTest.apk'
locales ['en-US', 'fr-FR']
clear_previous_screenshots true
When I execute fastlane, errors are displayed and it seems fastlane is not able to understand Appfile.
git:(develop) ✗ fastlane screengrab
[12:02:58]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
undefined method `app_package_name' for #<CredentialsManager::AppfileConfig:0x007f81cf463220>
undefined method `app_package_name' for #<CredentialsManager::AppfileConfig:0x007f81cf42b320>
undefined method `app_package_name' for #<CredentialsManager::AppfileConfig:0x007f81cf418fe0>
[12:03:01]: To not be asked about this value, you can specify it using 'app_package_name'
[12:03:01]: The package name of the app under test (e.g. com.yourcompany.yourapp): ^Cundefined method `app_package_name' for #<CredentialsManager::AppfileConfig:0x007f81cf30ba80>
undefined method `app_package_name' for #<CredentialsManager::AppfileConfig:0x007f81cf2f9538>
Does anyone have an idea what I do wrong ? Thanks a lot.
Nevermind, the config file is no longer called "Appfile" but "Screengrabfile" now...

How to use phonegap-facebook-plugin in ionic?

I'm building an app in ionic/Cordova in which I want my users to be able to log in using Facebook. So I'm trying to install the PhonegapFacebookPlugin that I found on ngCordova.com.
The first thing that I noticed was that the docs on the ngCordova.com website for installing the plugin on Android are different from the docs on the project's github docs. So I first tried using the (simpler) instructions on the github page first, which after installing and trying to use the following code:
facebookConnectPlugin.login(['email'],
function(data){ console.log(JSON.stringify(data));},
function(error){console.log(error);});
led to these errors:
file:///android_asset/www/lib/phonegap-facebook-plugin-master/facebookConnectPlugin.js: Line 181 : Uncaught ReferenceError: require is not defined
file:///android_asset/www/js/app.js: Line 23 : Uncaught TypeError: Cannot read property 'Keyboard' of undefined
file:///android_asset/www/lib/ionic/js/ionic.bundle.js: Line 19387 : TypeError: Cannot call method 'login' of undefined
at Scope.$scope.fbLogin (file:///android_asset/www/js/controllers.js:10:31)
at $parseFunctionCall (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:20124:18)
at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:50863:9
at Scope.$eval (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:22178:28)
at Scope.$apply (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:22276:23)
at HTMLButtonElement.<anonymous> (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:50862:13)
at HTMLButtonElement.eventHandler (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:10823:21)
at triggerMouseEvent (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:2811:7)
at tapClick (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:2800:3)
at HTMLDocument.tapTouchEnd (file:///android_asset/www/lib/ionic/js/ionic.bundle.js:2918:5)
After running into these errors, I tried continuing with the more extensive installation instructions on the ngCordova website, but the following command:
android update project --subprojects --path "platforms/android" --target android-19 --library "com.phonegap.plugins.facebookconnect/FacebookLib"
led to the following error:
Resolved location of library project to: /Users/kramer65/repos/my-app/platforms/android/com.phonegap.plugins.facebookconnect/FacebookLib
Error: Project folder '/Users/kramer65/repos/my-app/platforms/android/com.phonegap.plugins.facebookconnect/FacebookLib' is not a valid directory.
Error: No Android Manifest at: /Users/kramer65/repos/my-app/platforms/android/com.phonegap.plugins.facebookconnect/FacebookLib
This makes sense, because there is no folder called com.phonegap.plugins.facebookconnect/ in the platforms/android/ folder. I don't really know why not though. Do I need to copy-paste it there? Or did something go wrong in a previous step?
I'm stuck here and I really need to get this working. Any help would be greatly appreciated!

Categories

Resources