Android Question Maven artifact not found: com.google.firebase/firebase-ads

Deepak Shede

Member
Licensed User
Longtime User
1) updated sdk (image attached)

2) updated manifest with snippets and manifest looks like:-


'************ Google Play Services Base ************AddApplicationText(
<activity android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:exported="false"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@Integer/google_play_services_version" />
)'************ Google Play Services Base (end) ************

'************ Firebase Base ************CreateResourceFromFile("google-services", "google-services.json")
AddPermission(android.permission.ACCESS_NETWORK_STATE)
AddPermission(android.permission.INTERNET)
AddPermission(android.permission.WAKE_LOCK)
AddPermission(com.google.android.c2dm.permission.RECEIVE)
AddPermission(${applicationId}.permission.C2D_MESSAGE)
AddManifestText( <permission android:name="${applicationId}.permission.C2D_MESSAGE"
android:protectionLevel="signature" />)
AddApplicationText(
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD"/>
</intent-filter>
</receiver>

<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false"/>
<provider
android:authorities="${applicationId}.firebaseinitprovider"
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:exported="false"
android:initOrder="100" />
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD"/>
</intent-filter>
</receiver>

<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false"/>
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
android:exported="false" />


<service
android:name="com.google.firebase.iid.FirebaseInstanceIdService"
android:exported="true">
<intent-filter android:priority="-500">
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
)
'************ Firebase Base (end) ************
Notifications / FCM (Firebase Cloud Messaging) / push messages
Code:
'************ Firebase Notifications ************AddApplicationText(
<service
android:name="com.google.firebase.messaging.FirebaseMessagingService"
android:exported="true">
<intent-filter android:priority="-500">
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name="anywheresoftware.b4a.objects.FirebaseNotificationsService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
)'************ Firebase Notifications (end)************
Analytics and crash reports:
Code:
'************ Firebase Analytics ************AddApplicationText(
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD"/>
</intent-filter>
</receiver>

<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false"/>

<service android:name="com.google.firebase.crash.internal.service.FirebaseCrashReceiverService"
android:process=":background_crash"/>

<service android:name="com.google.firebase.crash.internal.service.FirebaseCrashSenderService"
android:process=":background_crash"/>
)'************ Firebase Analytics (end) ************


'************ Firebase Ads ************AddApplicationText(
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
<activity android:name="com.google.android.gms.ads.purchase.InAppPurchaseActivity"
android:theme="@style/Theme.IAPTheme"/>
)'************ Firebase Ads (end) ************

'************ Firebase Auth ************AddApplicationText(
<activity android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:excludeFromRecents="true"
android:exported="false" />

<service
android:name="com.google.android.gms.auth.api.signin.RevocationBoundService"
android:exported="true"
android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />
)'************ Firebase Auth (end) ************

3)copied android-support-v4 to additional library folder

4) copied google-play-services.jar to additional forlder

5) my code is:-

AdditionalJar:android-support-v4
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim ImageView1 As ImageView
'Private BtnEnter As Button
'Private btnExit As Button
Dim Adview1 As AdView
Private BtnRegister As Button
Private btnLogin As Button
Private btnResult As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Activity.LoadLayout("Main")
Activity.AddMenuItem("Centre","Centre")
Activity.AddMenuItem("Exit","Exit")
'Activity.AddMenuItem("Help","Help")
ImageView1.Initialize("Imageview1")
Adview1.Initialize("Ad", "ca-app-pub-3180664783039500~6608046671")
Activity.AddView(Adview1, 0dip, 0dip, 320dip, 50dip)' AdView1.LoadAd 'loads an ad
Adview1.LoadAd
' Adview1.Initialize2("Ad", "ca-app-pub-3180664783039500~6608046671", Adview1.SIZE_SMART_BANNER)
' Dim height As Int
' If GetDeviceLayoutValues.ApproximateScreenSize < 6 Then
' 'phones
' If 100%x > 100%y Then height = 32dip Else height = 50dip
' Else
' 'tablets
' height = 90dip
' End If
' Activity.AddView(Adview1, 3dip, 100%y - height, 100%x, height)
' Adview1.LoadAd
End Sub
'Sub Activity_Pause (UserClosed As Boolean)
' Adview1.Pause
'End Sub
'
'Sub Activity_Resume
' Adview1.Resume
'End Sub
Sub Centre_Click
StartActivity(Centre)
End Sub
Sub Ad_FailedToReceiveAd (ErrorCode As String)
Log("failed: " & ErrorCode)
End Sub
Sub Ad_ReceiveAd
Log("received")
End Sub
Sub Ad_AdScreenDismissed
Log("screen dismissed")
End Sub
Sub BtnRegister_Click
StartActivity(Registration)
End Sub
Sub btnLogin_Click
StartActivity(Login)
End Sub
Sub btnResult_Click
StartActivity(Result)
End Sub
Sub Exit_Click
'Dim Result As Int
'Result = Msgbox2 ("सॉफ्टवेयर बंद करायचे आहे का? ", "बंद करा ", "होय", "","नाही ",Null)
'If Result = DialogResponse.POSITIVE Then
Activity.Finish
End Sub

6) applied Firebaseadmob library repeated process again and again but gives maven artifact not found:com.gogle.firebase -ads NOT found error


please guide me as I am badly stuck
 

Attachments

  • erel.png
    erel.png
    67.5 KB · Views: 227
Top