我的應用程序是沒有錯誤的,然後我加入了Google Play Services
庫,我的應用程序使用AdMob
。我着手進行這些更改清單:添加谷歌Play服務將導致錯誤轉換爲Dalvik的格式失敗,錯誤1
<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"/>
我還添加了一個Activity
的指示:
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
然後我下面的代碼添加到我的MainActivity
:
AdView adView;
adView=(AdView)findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().addTestDevice("3b9bdbbc9b1c3b30").build();
adView.loadAd(adRequest);
的值是在先前xml
定義爲:
<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"
/>
我試圖取消Force error when external jar contains native code
,clean
該應用,然後運行it.My應用具有它使用三個外部庫:
1.tess-two
2.android-support-v7 appcompat
3.google-play-services_lib
我使用包com.blutechnologies.scancard
爲我的應用程序,以便類由系統唯一處理。
我有一個SplashActivity
和MainActivity
這也可能很容易被其他libraries.Are的一部分,他們的衝突的原因還是有在tess-two
和類之間的衝突google-play-services
是什麼原因造成這個錯誤,我怎麼能修理它?
控制檯還具有一個錯誤:
Dx trouble processing "java/sql/Savepoint.class":
的鏈接到我的Order and Export
文件here
謝謝,刪除'android.jar'庫幫助我 – vamsiampolu
請注意,Admob現已打包爲Google Play服務的一部分。 Amdob-6.4.1是*之前的最後一個圖書館*。 – William