Category Archives: Bugs, warnings, errors

Bugs and errors in IDE Eclipse or Android ADT emulator

83 views

EditText.setOnKeyListener not working on maxLines EditText

Check this in XML file if use singleLine singleLine change to maxLines (1 if singleLine) declare inputType android:maxLines="1" android:inputType="text"

Posted in Android Examples Code, Bugs, warnings, errors | Tagged , , | Comments Off on EditText.setOnKeyListener not working on maxLines EditText
96 views

EditText hint not show

Try this solution – into xml file add row to EditText tag: android:textColorHint="@color/grey"

Posted in Android Examples Code, Bugs, warnings, errors | Tagged , , | Comments Off on EditText hint not show
389 views

All com.android.support libraries must use the exact same version specification

For example: If You using compileSdkVersion 25 buildToolsVersion “25.0.0” You have to using latest version of support libraries with number 25. Also check the library project!   apply plugin: ‘com.android.application’   android { compileSdkVersion 25 buildToolsVersion "25.0.0"   defaultConfig { … Continue reading

Posted in Android Studio, Bugs, warnings, errors | Tagged , | Comments Off on All com.android.support libraries must use the exact same version specification
759 views

InterstitialAd Admob not visible

// on bottom of onCreate add listener mInterstitialAd .setAdListener(new AdListener(){ public void onAdLoaded(){ interstitial.show(); } });   } // end onCreate   public void displayInterstitial (){ if (mInterstitialAd.isLoaded()) { mInterstitialAd.show(); } }

Posted in Android Studio, Bugs, warnings, errors | Tagged | Comments Off on InterstitialAd Admob not visible
703 views

Android Studio emulator errors warnings issue

– check errors, warnings in build.gradle and other files – Sync project – Clean project – Rebuild project – restart Android Studio – restart ADB – update Tools, libraries, etc. Speed Up Gradle Build In Android Studio -a android.intent.action.MAIN -c … Continue reading

Posted in Android Studio, Bugs, warnings, errors | Tagged , | Comments Off on Android Studio emulator errors warnings issue
969 views

FrameLayout fragment not visible Android

ListFragment show only one item issue Try to change layout_width to 0dp <fragment android:name="cz.okhelp.android.fragchangfromlist.ArticleFragment" android:id="@+id/article_fragment" android:layout_weight="2" android:layout_width="0dp" android:layout_height="match_parent" /> <!–todo LAYOUT_WIDTH have to be 0dp !!!!!!!!!!!!!!!!!!!!! –>   <FrameLayout android:id="@+id/article_fragment" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="2" />

Posted in Android Studio, Bugs, warnings, errors | Comments Off on FrameLayout fragment not visible Android
1,045 views

NumberFormatException Color value drawable must start with

NumberFormatException Color value drawable must start with NumberFormatException: Color value ‘@drawable/my_picture’ must start with # Check all colors tags if value start with# Read this and check path c:\Users\me\AndroidStudioProjects\myProject\myModule\build\intermediates\res\merged\debug\ values folder for corupted values or delete ALL values folders or … Continue reading

Posted in Android Studio, Bugs, warnings, errors | Tagged , | Comments Off on NumberFormatException Color value drawable must start with
1,143 views

Android Studio failed to convert drawable into a drawable

Try this: – check names of drawables (file name must contain only abc…xyz 012…789 _ . in Resources folder , names have to start with lower case MyImage.jpg == problem , names with space my image.jpg == problem, names with … Continue reading

Posted in Android Studio, Bugs, warnings, errors | Tagged , | Comments Off on Android Studio failed to convert drawable into a drawable
960 views

ClassCastException fragments.MainActivity must implement OnHeadlineSelectedListener

Problem: You have two class with similar names HeadLinesFragment and HeadMyLinesFragment with OnHeadlineSelectedListener. Check if call correct class in MainActivity. For example if use HeadMyLinesFragment change implement to HeadMyLinesFragment too! public class MainActivity extends FragmentActivity implements HeadLinesFragment.OnHeadlineSelectedListener { // wrong … Continue reading

Posted in Android Examples Code, Bugs, warnings, errors | Tagged | Comments Off on ClassCastException fragments.MainActivity must implement OnHeadlineSelectedListener
826 views

Who has higher priority build.gradle or AndroidManifest Android Studio

build.gradle in module have higher priority then AndrodiManifest.xml Try this. AndroidManifest.xml have code: <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="23" /> build.gradle have code: defaultConfig { applicationId "cz.okhelp.words" minSdkVersion 9 targetSdkVersion 19 versionCode 107 versionName "1.0.7" } Warning in AndroidManifest.xml: This targetSdkVersion value (23) … Continue reading

Posted in Android Studio, Bugs, warnings, errors | Tagged | Comments Off on Who has higher priority build.gradle or AndroidManifest Android Studio