This error for adding new feature adMob
The first issue is because there is the use of the same name in line number 13 of the
AndroidManifest.xml file. The error is similar to the one shown in the image above. If there are two instances of this
android:name="???", then delete one of them. It is located in the application section, as shown in the example below.
Error in the package
Next, this is not a Gradle error. I mistakenly thought that this error was due to my Gradle not being updated or an error in Gradle in Android Studio. So initially, I updated the Android Studio version and also updated the Gradle version, but this error still appeared. After rereading the error, I finally found the problem, which is that the package I registered in the `pubspec.yaml` is causing the error, and the package that is causing the error is
blue_thermal_printer. So for now, I will temporarily remove this package.
the solution that error above:
shared_preferences: ^2.0.17 #<--For local save or load data
connectivity_plus: ^3.0.3 #<-- cek conection #<- not yet
# blue_thermal_printer: ^1.2.3 #<-- for printer just android #<- not yet
Error when running in Simulator iOS
Next, there is an error when I run it on the iOS simulator with the error
GADInvalidInitializationException. The reason is that I haven't registered the Google AdMob ID for iOS in the
info.plist file, as it should be initialized with an application ID.
Info.plist in this file
After I fixed the two errors earlier, my app can now be run on iOS and Android. Here is the result. for the next article, I will show the results of the AdMob that has been running on both platforms.