Monday, September 30, 2019

Error: cannot find symbol import

Having same problem like i had?

node_modules/react-native-audio/android/src/main/java/com/rnim/rn/audio/ error: cannot find symbol
  symbol:   class ActivityCompat
  location: package

Or something looks similar that saying
Well here is the SO, the solution is to jetify.

Use this :
step 1: add these two lines in Visit for complete guideline
step 2: use these commands
First of all remove node_modules folder and reinstall it using
npm install 
and then
npm install --save-dev jetifier 
npx jetify  
npx react-native run-android 
npx jetify
Happy coding ^^

Monday, September 23, 2019

Mapbox-gl Map got truncated

Mapbox-gl got initialized and then tap a button nav.push(xxx) and then from xxx.ts nav.pop().

Then the map got truncated or not full screen.

The solution is to call with setTimeout() 200-250ms would do. 

Thursday, May 23, 2019

XCode duplicate symbol architecture arm64

Yup i came across, when XCode build Archive the error were ld: 362 duplicate symbols for architecture arm64. The solution is the provided link.

Open Podfile and check the bottom part:
supposed to show something like

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if == "React"

Quotes answer from Alexandre Lage
I solved this issue by the following: (ref.:
  1. Open Xcode > Pods > Targets Support Files > Pods-{TARGET-NAME} find "OTHER_LDFLAGS" and remove only -ObjC in these two files:
Pods-{TARGET-NAME}.release.xcconfig e Pods-{TARGET-NAME}.debug.xcconfig
  1. Go to project main target > Build Settings > Other Linker Flags: Make sure no -ObjC is left in the value I deleted the build/Build folder in ios and run your project again.
It works now.
Side effects from the link above: the app may become larger as there may be duplicated symbols in it.
Hope it can help you.

If you see none, that add that one and then execute $ pod install
so the Pods project would be rebuild.

thank you ^^

Thursday, April 11, 2019

ReactNative Error no such file or directory: '.../node_modules/react-native-maps/lib/ios/AirGoogleMaps/DummyView.m'

If you eve encounter the same situation

clang: error: no such file or directory: '/Users/adesantoasman/.../node_modules/react-native-maps/lib/ios/AirGoogleMaps/DummyView.m'

Then simply do these:
1. go to the node_modules/react-native-maps/lib/ios/AirGoogleMaps/

2. the copy
cp AIRDummyView.h DummyView.h
cp AIRDummyView.m DummyView.m

3. edit the content of respective files to

//  AIRDummyView.h
//  AirMapsExplorer
//  Created by Gil Birman on 10/4/16.



@interface DummyView : UIView
@property (nonatomic, weak) UIView *view;
- (instancetype)initWithView:(UIView*)view;


//  AIRDummyView.m
//  AirMapsExplorer
//  Created by Gil Birman on 10/4/16.


#import "DummyView.h"

@implementation DummyView
- (instancetype)initWithView:(UIView*)view
  if ((self = [super init])) {
    self.view = view;
  return self;


Hope it helps ^^

Monday, April 8, 2019

Thursday, April 4, 2019

ReactNative, pod install, Archive faliled with duplicate *.o

I resolved this issue and succesfully implemented GMaps on IOS simulator by the followings:
  1. Open Xcode > Pods > Targets Support Files > Pods-{TARGET-NAME}
  1. find "OTHER_LDFLAGS" and remove only "-ObjC" in these two files:
  1. Pods-{TARGET-NAME}.release.xcconfig & Pods-{TARGET-NAME}.debug.xcconfig
  1. Go to project main target > Build Settings > Other Linker Flags:
  1. Make sure no "-ObjC" is left in the value
  1. I deleted the build/Build folder in ios and run-ios again. It works now.
  1. Also make sure you have enable Google Maps SDK for iOS on Google APIs console (only enabling API key will not success)
Side effects from the link above: the app may become larger as there may be duplicated symbols during compile
Hope can help you.
P.S. Not yet try on real device

Friday, February 1, 2019

ionic2 Android, Build failed version 9.2.0 is needed for the google-services plugin

You could edit a file of platforms/android/cordova-plugin-fcm/xxx-FCMPlugin.gradle
At the end of the file shows

dependencies {
compile ''
compile ''

Modify to,

dependencies {
compile ''
compile ''

Then recompile, hope it helps ^^

ionic2 ios xcode failed at Linking with duplicate symbols

ionic2 projects are very sensitive with its node_modules and dependencies, to me personally.
And bad luck came to me when i rename my project name. And the iOS platform has to be

$ ionic cordova platform rm ios
$ ionic cordova platform add ios

Starting all my problems. After successfully running
$ cordova platform rm ios
$ corvoda build ios
Everything went smooth event i can archive and upload to TestFligtth

And the day after, i had to compile and release in Android. The 1st problem starts
the $ionic/core had thrown version is '4' expected is '3'. After several time of
remove node_modules/ dir and npm install with no luck. I decided to
$ npm cache clean --force
$ npm install
$ cordova platform rm android
$ cordova platform rm ios
$ cordova platform add android@6.3.0
$ cordova platform add ios@4.5.4

I don't really sure if that is the root of all evil, anyway the Android was smooth.
And i need to be sured that smooth to ios too. And there is something to be edited,
an error of _requiresUserActionForMediaPlayback at AppBackground.m
just remove the underscore ( _ ) char from the beginning or requiresUser..

And if you stumbled with linking problem, as it shows many duplicate vars
at the xcode build report, then simply go to build phase and type the keyword
e.g SOSPicker then it will shows 2 or more SOSPicker.m and remove the ones
that not use then rebuild.

Hope it helps

cordova build android, Error spawn EACCES

Reference too
cordova build --verbose android helps identifying a necessary
is the solution. It will shows which gradle being used.

As per my case `$ which gradle ` shows to /usr/local/bin/gradle but
the cordova execution refers to Android Studio' gradle.

Hope it help ^^