Tag Archives: emulator

7,142 views

No USB devices or running detected

Check is sett debug mode on device? enabled debugging over USB? is device right connected? have you downloaded and instaled drivers for your device on PC? For Windows http://developer.android.com/sdk/win-usb.html try disconnect and connect USB cable try do restart Android Studio

Posted in Android Studio, Bugs, warnings, errors | Tagged | Comments Off on No USB devices or running detected
2,001 views

Set theme of AdActivity to @android:style/Theme.Translucent

AndroidManifest.xml <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent" />

Posted in Android Examples Code, Bugs, warnings, errors, Eclipse | Tagged , , | Comments Off on Set theme of AdActivity to @android:style/Theme.Translucent
2,572 views

Admob ad not visible on Android Emulator

Try this solution: AdView adView = new AdView(getApplicationContext());//in menu inflater getActivity() adView.setAdUnitId("ca-app-pub-87***yourNumber"); adView.setAdSize(AdSize.BANNER); LinearLayout linLay = (LinearLayout)findViewById(R.id.idReklamaLayout); // Add the adView to it linLay.addView(adView); // Initiate a generic request to load it with an ad if(Build.MANUFACTURER.equals("unknown")) { // Emulator AdRequest.Builder.addTestDevice("B3EEABB8EE11C2BE770B684D95219ECB"); … Continue reading

Posted in Android Examples Code, Bugs, warnings, errors, Eclipse | Tagged , , | Comments Off on Admob ad not visible on Android Emulator
5,137 views

Android 4.4 Emulator does not rotate screen

Some bug in Android 4.4 Emulator If I press Ctrl + F11 applications screen does not rotate. You can change Screen Orientation programatically for example by menu item private static final int MY_MENU_6 = Menu.FIRST + 5; private static final … Continue reading

Posted in Bugs, warnings, errors, Eclipse | Tagged , , , , | Comments Off on Android 4.4 Emulator does not rotate screen
2,377 views

setTesting(boolean) from the type AdRequest is deprecated

Admob testing on emulator issue. Android Eclipse code warning: setTesting(boolean) from the type AdRequest is deprecated Solution: adRequest.addTestDevice(AdRequest.TEST_EMULATOR); AdView adView = new AdView(this, AdSize.BANNER, "a14d9……….");//MY_AD_UNIT_ID AdRequest adRequest = new AdRequest(); adRequest.setTesting(true); // deprecated   adRequest.addTestDevice(AdRequest.TEST_EMULATOR); // OK adView.loadAd(adRequest);

Posted in Android Examples Code | Tagged , , | Comments Off on setTesting(boolean) from the type AdRequest is deprecated
2,153 views

Admob ads not visible on emulator Android 4.1

If you using GoogleAdMobAdsSdk-4.0.4.jar in your project and set android:targetSdkVersion=”17″ in AndroidManifest.xml , ads will not visible on emulator with Android 4.0.3 or 4.1. You have to set as android:targetSdkVersion=”17″ <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17" /> Update project.properties file – row with … Continue reading

Posted in Android Examples Code, Bugs, warnings, errors, Eclipse | Tagged , , | Comments Off on Admob ads not visible on emulator Android 4.1
3,019 views

Programmatically determine if App is running on Android Emulator

You can get list by class Build For example: if(Build.MANUFACTURER.equals("unknown")) { // Emulator } List of Build class getting from emulator: “BOARD=unknown BRAND=generic CPU_ABI=armeabi DEVICE=generic DISPLAY=sdk-eng 2.1-update1 ECLAIR 35983 test-keys FINGERPRINT=generic/sdk/generic/:2.1-update1/ECLAIR/35983:eng/test-keys HOST=android-test-13.mtv.corp.google.com ID=ECLAIR MANUFACTURER=unknown MODEL=sdk PRODUCT=sdk TAGS=test-keys TIME=1273161972000 TYPE=eng USER=android-build … Continue reading

Posted in Android Examples Code | Tagged | Comments Off on Programmatically determine if App is running on Android Emulator
3,711 views

Disable enable internet connection in Android Emulator

If you try function for checking internet connection you can disable internet on the emulator: Settings – Wireless and networks – Mobile networks – Data enabled (checked – unchecked ) public boolean isNetworkAvailable() { ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo … Continue reading

Posted in Android Examples Code | Tagged | Comments Off on Disable enable internet connection in Android Emulator
5,075 views

uses-sdk tag should specify a target API level AndroidManifest warning

<uses-sdk> tag should specify a target API level (the highest verified version; when running on later versions, compatibility behaviors may be enabled) with android:targetSdkVersion="?" This is OK for Android 2.1 and higher project.properties # Project target. target=android-7 AndroidManifest.xml <uses-sdk android:minSdkVersion="7" … Continue reading

Posted in Bugs, warnings, errors, Eclipse | Tagged , | Comments Off on uses-sdk tag should specify a target API level AndroidManifest warning
6,754 views

Accessibility Missing contentDescription attribute on image

Android Emulator warning:[Accessibility] Missing contentDescription attribute on image Workaround example code: android:contentDescription="@string/desc"   <ImageView android:id="@+id/imageViewOil" android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@string/desc" android:layout_alignParentLeft="true" android:layout_centerVertical="true" android:layout_marginLeft="84dp" android:src="@drawable/tank_silver" />

Posted in Bugs, warnings, errors, Eclipse | Tagged , | Comments Off on Accessibility Missing contentDescription attribute on image