Twitter Facebook Delicious Digg Stumbleupon Favorites More
Showing posts with label ANDROID PROBLEM AND SOLUTION. Show all posts
Showing posts with label ANDROID PROBLEM AND SOLUTION. Show all posts

Saturday, 11 August 2018

Render problem Failed to find style 'coordinatorLayoutStyle' in current theme Missing styles. Is the correct theme chosen for this layout? failed to instantitte one or more classes

Render problem Failed to find style 'coordinatorLayoutStyle' in current theme Missing styles. Is the correct theme chosen for this layout? failed to instantiate one or more classes


achange sdk 28 to 27 and go to Tools >> sdk manager and download API LEVEL 27


apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.example.raj.test"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.android.support:design:27.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

Share:

ConstraintLayout problem solution AUGUST 2018

change sdk 28 to 27 and go to Tools >> sdk manager and download API LEVEL 27


apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.example.raj.test"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.android.support:design:27.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

Share:

Sunday, 1 July 2018

adb.exe,start-server' failed — run manually if necessary, Android Studio


'C:\Users\viraj\AppData\Local\Android\sdk\platform-tools\adb.exe,start-server' failed -- run manually if necessary



Solution



  1. stopped genymotion emulator.
  2. Then  restart ADB (Tools > Android > Unchecked Unable ADB Integration then  checked again)
  3. Next  start genymotion emulator again And now the app works on the emulator.
Share:

Saturday, 30 June 2018

Failed to load AppCompat ActionBar with unknown error?

Failed to load AppCompat ActionBar with unknown error?

I had the same problem. Seems it is a Android Studio bug.
In your styles xml-file change this:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
to this:
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
Works for me.
Share:

Sunday, 24 June 2018

unable-to-resolve-dependency error solution

just go to Settings >Gradle >Disable Offline Work 
Share:

Thursday, 21 June 2018

Render problem Failed to load AppCompat ActionBar with unknown error.



REPLACE 3 WITH 1 

Share:

Saturday, 19 May 2018

raw file creation


Share:

Tuesday, 17 April 2018

Tips to speed Up Android Studio

  • Update Android Studio(2.3) and Java To the latest One
  • Disable unwanted PluginsDemo Video
  • If you are not using VCS and Google Cloud Services then disable the following Plugins:
GitIntegration, GitHub, CVS Integration, Google Login and its dependent Plugins, Subversion Integration.
  • Close All Windows and Browser While Using Android Studio.
  • Avoid Built in Emulators. Try GenyMotion or Real Devices(Recommended)
  • Disable Unwanted Startup ProgramsCheck the help here
  • Tweak the Gradle to reduce Build Time
  • Update Your RAM to 8GB (atleast 4GB)
Hope its helpful..!! Happy Androidify...!!!!

video link 
Share:

Monday, 15 January 2018

arti type app new line solution

<resources>
    <string name="app_name">Del</string>
    <string name="hindi">

        <html> जय देव, जय देव, जय शिव मार्तंडा…\n
हरी मदन मल्हारी तूची प्रचंडाजय देव !\n
\n
जेजुरगड पर्वत शिवलिंगाकार, मृत्युलोकी दुसरे कैलास शिखर,\n
नाना परि ती रचना रचली अपार,\n
त्रयेस्थळी नांदे स्वामी शंकर....जय देव !\n
जय देव, जय देव, जय शिव मार्तंडा…\n
हरी मदन मल्हारी तूची प्रचंडाजय देव !\n
\n
मणि-मल्ल दैत्य प्रबळ तो झाला,\n
देव-गण-गंधर्व कापति त्याला,\n
हाती तलवार, खडग, त्रिशूळ, भाला,\n
आदि शक्ती म्हाळसा घेउन संगतिला....जय देव !\n
जय देव, जय देव, जय शिव मार्तंडा…\n
हरी मदन मल्हारी तूची प्रचंडाजय देव !\n
\n
चंपा शष्ठी दिवशी अवतार धरिशी,\n
मणि-मल्ल दैत्यांचा संहार करीशी,\n
चरणी पृष्टि वरति खडग़ स्थापिशी,\n
अंति वर देउनी त्यास मुक्ति दे देशी.....जय देव !\n
जय देव, जय देव, जय शिव मार्तंडा…\n
हरी मदन मल्हारी तूची प्रचंडाजय देव !\n
\n
मणि-मल्ल दैत्य मर्दुनी मल्हारी,\n
देवा संकट पडता राहे जेजूरी,\n
अर्धांगी म्हाळसा शोभे सुंदरी,\n
देवा ठाव मागे दास नरहरि....जय देव !\n
जय देव, जय देव, जय शिव मार्तंडा…\n
हरी मदन मल्हारी तूची प्रचंडाजय देव !\n</html>
    </string>
</resources>


or plz check

TextView txtSubTitle = (TextView)findViewById(r.id.txtSubTitle);
txtSubTitle.setText(Html.fromHtml(getResources().getString(R.string.sample_string)));
Share:

Wednesday, 22 November 2017

Radio Button direct Click

package com.example.viraj.radiobuton;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {
    private RadioGroup radioGroup;
    private RadioButton radioButton;
   

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        radioGroup = (RadioGroup) findViewById(R.id.id_radioGroup);
       
        radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup radioGroup, int i) {
                radioButton = (RadioButton) findViewById(i);

                switch (radioButton.getId()) {
                    case R.id.id_yes: {
                        if (radioButton.isChecked()) {
                            Toast.makeText(getApplicationContext(), "YES I AM COMING", Toast.LENGTH_LONG).show();
                        }

                    }
                    break;
                    case R.id.id_no: {
                        if (radioButton.isChecked()) ;
                        {
                            Toast.makeText(getApplicationContext(), "NO I AM NOT COMING", Toast.LENGTH_LONG).show();
                        }
                    }
                    break;
                    case R.id.id_maybe: {
                        if (radioButton.isChecked()) ;
                        {
                            Toast.makeText(getApplicationContext(), "MAY BE COMING", Toast.LENGTH_LONG).show();
                        }
                    }
                    break;
                }
            }
        });


    }
}


xml file

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/one"
    tools:context="com.example.viraj.radiobuton.MainActivity">

    <RadioGroup
        android:id="@+id/id_radioGroup"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="52dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/textView">

        <RadioButton
            android:id="@+id/id_yes"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="YES" />

        <RadioButton
            android:id="@+id/id_no"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="NO" />

        <RadioButton
            android:id="@+id/id_maybe"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="MAY BE" />
    </RadioGroup>

    <TextView
        android:id="@+id/textView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="76dp"
        android:text="ARE YOU COMING ...."
        android:textColor="@color/colorPrimaryDark"
        android:textSize="24sp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.503"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>

Share:

colour converter app

package com.gohool.trymeoriginal.trymeoriginal;


import android.graphics.Color;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

import com.example.viraj.trymecolourconverter.R;

import java.util.Random;


public class MainActivity extends AppCompatActivity {

    private View windowView;
    private Button tryMeButton;
    private int[] colors;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        colors = new int[]{Color.CYAN, Color.GREEN, Color.RED, Color.BLUE, Color.BLACK, Color.DKGRAY,
                Color.LTGRAY, Color.MAGENTA, Color.YELLOW};

        windowView = findViewById(R.id.windowViewId);



        tryMeButton = (Button) findViewById(R.id.tryMeButton);
        tryMeButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                //Array length
                int colorArrayLength = colors.length;

                Random random = new Random();
                int randomNum = random.nextInt(colorArrayLength);

                windowView.setBackgroundColor(colors[randomNum]);

                Log.d("Random", String.valueOf(randomNum));
            }
        });







    }
}

Share:

Tuesday, 25 July 2017

localhost with android not working solution


  1. run you wamp server => click right mouse button => and click on "put online"
  2. then open your cmd as an administrateur , and pass in this commande word
  3. then lot of adresses show-up , then you have just to take the first one , it's look like this example: Adresse IPv4. . . . . . . . . . . . . .: 192.168.67.190 well done ! , that's the addresse, that you will use to connecte to your wampserver in local.
  4. open Control Panel >> System and Security >> Windows Firewall
  5. then go to control panel > system and security > windows firewall and turn windows firewall off
  6. now String reg_url = "http://192.168.00.0/udemy/register.php";

"""   past ur address  >>>>>>    192.168.00.0  """
Share:

Search This Blog

Popular Posts

Pages

how to make crores from 1 lakh in stock markets in 1 year

how to make crores from 1 lakh in stock markets in 1 year

Blogger Tutorials

Blogger Templates

Sample Text

Copyright © ANDROID TUTORIAL CODE | Powered by Blogger
Design by SimpleWpThemes | Blogger Theme by NewBloggerThemes.com & Distributed By Protemplateslab