How to use the Facebook tool “infer” for Android application in android studio ?

Follow install infer or more detail about infer

if you have problem during installation steps compile-infer-from-source-with-clang-enabled follow below things

# Checkout Infer
git clone https://github.com/facebook/infer.git
cd infer

eval $(opam config env)

./compile-fcp.sh

make -C infer

export PATH=`pwd`/infer/bin:$PATH

Now open your Project’s local.properties and add

infer=-- ./gradlew build

also need to add lintOptions into build.gradle

lintOptions {
    abortOnError false
}

now open your terminal inside of android studio and write below command “/Users/…/infer/infer/bin/infer” you need to pass your infer location where you had install till the path of bin/infer

/Users/.../infer/infer/bin/infer -- ./gradlew build
Advertisements

Solution : How to configure the adb or device if not displaying in eclipse at the time of running android project in ubuntu 13.10

you can find more details form here : http://developer.android.com/tools/device.html#VendorIds

step 1:

Open terminal and type gedit /temp/android.rules

then copy below content and paste into the andoid.rules file and save it :

SUBSYSTEM==”usb”, ATTRS{idVendor}==”0bb4″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”0e79″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”0502″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”0b05″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”413c”, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”0489″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”091e”, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”18d1″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”0bb4″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”12d1″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”24e3″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”2116″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”0482″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”17ef”, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”1004″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”22b8″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”0409″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”2080″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”0955″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”2257″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”10a9″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”1d4d”, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”0471″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”04da”, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”05c6″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”1f53″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”04e8″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”04dd”, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”0fce”, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”0930″, MODE=”0666″ SUBSYSTEM==”usb”, ATTRS{idVendor}==”19d2″, MODE=”0666″

step 2: Now type following command on the terminal

$ sudo cp /tmp/android.rules /etc/udev/rules.d/51-android.rules

$ sudo chmod 644 /etc/udev/rules.d/51-android.rules

$ sudo chown root. /etc/udev/rules.d/51-android.rules

$ sudo service udev restart

$ sudo killall adb

step 3: Disconnect your phone cable from the computer

step 4: Again Reconnect the phone

step 5: type adb devices for test

Solution : Text is changing while we scrolling the listview

   static class ViewHolder {
        private TextView textView;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        // TODO Auto-generated method stub
        ViewHolder holder = null;

        if (convertView == null) {
            convertView = mLayoutInflater.inflate(R.layout.dialog_list_text,
                    null);
            holder = new ViewHolder();
            holder.textView = (TextView) convertView
                    .findViewById(R.id.list_context_menu_textview);
            convertView.setTag(holder);
            convertView
                    .setTag(R.id.list_context_menu_textview, holder.textView);
        } else {
            holder = (ViewHolder) convertView.getTag();
        }

        holder.textView.setText(mStringArray.get(position));
        return convertView;
    }