My app was error-free,then I added the Google Play Services
library to my app for using AdMob
.I proceeded to make these changes to the manifest:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
I also added an Activity
as directed:
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
Then I added the following code to my MainActivity
:
AdView adView;
adView=(AdView)findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().addTestDevice("3b9bdbbc9b1c3b30").build();
adView.loadAd(adRequest);
The value was previously defined in xml
as:
<com.google.android.gms.ads.AdView android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
ads:adUnitId="MY AD UNIT ID"
ads:adSize="BANNER"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
/>
I have tried to uncheck Force error when external jar contains native code
,clean
the app and then run it.My app has three external libraries it is using:
1.tess-two
2.android-support-v7 appcompat
3.google-play-services_lib
I use the package com.blutechnologies.scancard
for my app so that the classes are treated uniquely by the system.
I have a SplashActivity
and MainActivity
which might also easily be part of other libraries.Are they a cause of the clash or is there a clash between classes in tess-two
and google-play-services
What caused this error and how can I fix it?
The console also has an error:
Dx trouble processing "java/sql/Savepoint.class":
The link to my Order and Export
file is here