Expo EASerror react-native-google-mobile-ads,

Hello guys, I need help
I have google maps on my project, now when I install the react-native-google-mobile-ads, my app don’t build with this error with android and ios

> Configure project :react-native-google-mobile-ads

:react-native-google-mobile-ads package.json found at /home/expo/workingdir/build/node_modules/react-native-google-mobile-ads/package.json

10 actionable tasks: 10 executed

[stderr] FAILURE: Build completed with 2 failures.

[stderr]
1: Task failed with an exception.
[stderr]
[stderr]
* Where:

[stderr]
Build file '/home/expo/workingdir/build/node_modules/react-native-google-mobile-ads/android/build.gradle' line: 75
[stderr]
* What went wrong:
[stderr] A problem occurred evaluating project ':react-native-google-mobile-ads'.

[stderr]
> Cannot get property 'googleMobileAdsJson' on extra properties extension as it does not exist

[stderr]

  • Try:

175

[stderr]

Run with --stacktrace option to get the stack trace.


176

[stderr]

Run with --info or --debug option to get more log output.


177

[stderr]

Run with --scan to get full insights.


178

[stderr]

==============================================================================


179

[stderr]

2: Task failed with an exception.


180

[stderr]



181

[stderr]

  • What went wrong:

182

[stderr]

A problem occurred configuring project ‘:react-native-google-mobile-ads’.


183

[stderr]

compileSdkVersion is not specified. Please add it to build.gradle


184

[stderr]

  • Try:

185

[stderr]

Run with --stacktrace option to get the stack trace.


186

[stderr]

Run with --info or --debug option to get more log output.


187

[stderr]

Run with --scan to get full insights.


188

[stderr]

==============================================================================


189

[stderr]


190

[stderr]

BUILD FAILED in 3m 22s


191

Error: Gradle build failed with unknown error. See logs for the “Run gradlew” phase for more information.

Hi @geneses

This is really a question for react-native-google-mobile-ads, but first have a look at this issue:

and the documentation:

In particular the part where it says “If you’re an expo user […]”

1 Like

@wodin Thank you,
I already see this post, but I have alway this error:
this is my app.json
is here: https://pastebin.com/wPbJf1Tw

Can you try creating a new app and adding react-native-google-mobile-ads to it to see if that builds?

Okay, I create new one and test

hello, I create new app
and add google-mobile-ads package, en build it all is fine,

1 Like

:sweat_smile:
I don’t know why, I remove all single quote in my custom message alert of google map others permissions, and rebuild all is fine…
:rofl: :rofl: :rofl:

Before it’s like this:

Team Sport a besoin de votre position pour fournir des fonctions de navigation et de carte. Donnez la permission à l’app vous permet d’effectuer toutes vos sauvegardes d’activitée avec l’adresse dont vous choisissez…

Nowit’s like this:

Team Sport a besoin de votre position pour fournir des fonctions de navigation et de carte. Donnez la permission à notre app pour effectuer toutes vos créations activitées avec adresse dont vous choisissez et permet aux autres utilisateurs de voir votre activités selon sa localisation…"

That’s very strange. Maybe if you create an issue in the react-native-google-mobile-ads repository they can figure out what is wrong.

Okay :+1: