com.google.firebase.database.DatabaseException: Can't convert object of type java.lang.String to type 3
<p>I have a problem, that I can't solve. I want to make a realtime database with firabase,  but when I going to This Activity, the system stop down. I tried everything, but i cant solve this problem. I'm a beginner so its difficult to me. Please help..</p>

<pre><code>09-01 08:57:57.018 2787-2787/sgtt.celtkituzes_0_1 E/AndroidRuntime: FATAL EXCEPTION: main
                                                                    Process: sgtt.celtkituzes_0_1, PID: 2787
                                                                    com.google.firebase.database.DatabaseException: Can't convert object of type java.lang.String to type sgtt.celtkituzes_0_1.AimToAim
                                                                        at com.google.android.gms.internal.zzaln.zzd(Unknown Source)
                                                                        at com.google.android.gms.internal.zzaln.zzb(Unknown Source)
                                                                        at com.google.android.gms.internal.zzaln.zza(Unknown Source)
                                                                        at com.google.firebase.database.DataSnapshot.getValue(Unknown Source)
                                                                        at com.firebase.ui.database.FirebaseRecyclerAdapter.parseSnapshot(FirebaseRecyclerAdapter.java:147)
                                                                        at com.firebase.ui.database.FirebaseRecyclerAdapter.getItem(FirebaseRecyclerAdapter.java:136)
                                                                        at com.firebase.ui.database.FirebaseRecyclerAdapter.onBindViewHolder(FirebaseRecyclerAdapter.java:176)
                                                                        at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:5471)
                                                                        at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:5504)
                                                                        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4741)
                                                                        at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4617)
                                                                        at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1994)
                                                                        at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1390)
                                                                        at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1353)
                                                                        at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:549)
                                                                        at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3028)
                                                                        at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2906)
                                                                        at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3283)
                                                                        at android.view.View.layout(View.java:15671)
                                                                        at android.view.ViewGroup.layout(ViewGroup.java:5038)
                                                                        at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1076)
                                                                        at android.view.View.layout(View.java:15671)
                                                                        at android.view.ViewGroup.layout(ViewGroup.java:5038)
                                                                        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
                                                                        at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
                                                                        at android.view.View.layout(View.java:15671)
                                                                        at android.view.ViewGroup.layout(ViewGroup.java:5038)
                                                                        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
                                                                        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
                                                                        at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
                                                                        at android.view.View.layout(View.java:15671)
                                                                        at android.view.ViewGroup.layout(ViewGroup.java:5038)
                                                                        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
                                                                        at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
                                                                        at android.view.View.layout(View.java:15671)
                                                                        at android.view.ViewGroup.layout(ViewGroup.java:5038)
                                                                        at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
                                                                        at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
                                                                        at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
                                                                        at android.view.View.layout(View.java:15671)
                                                                        at android.view.ViewGroup.layout(ViewGroup.java:5038)
                                                                        at android.widget.FrameLayout.layoutChildren(FrameLayout.java:579)
                                                                        at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
                                                                        at android.view.View.layout(View.java:15671)
                                                                        at android.view.ViewGroup.layout(ViewGroup.java:5038)
                                                                        at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2086)
                                                                        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1843)
                                                                        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1061)
                                                                        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5885)
                                                                        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
                                                                        at android.view.Choreographer.doCallbacks(Choreographer.java:580)
                                                                        at android.view.Choreographer.doFrame(Choreographer.java:550)
                                                                        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
                                                                        at android.os.Handler.handleCallback(Handler.java:739)
                                                                        at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                        at android.os.Looper.loop(Looper.java:135)
                                                                        at android
</code></pre>

<p>Login activity</p>

<pre><code>package sgtt.celtkituzes_0_1;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;

import com.backendless.Backendless;
import com.backendless.BackendlessUser;
import com.backendless.async.callback.AsyncCallback;
import com.backendless.exceptions.BackendlessFault;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;

public class LoginActivity extends AppCompatActivity {

    public static final String APP_ID = "yyy";
    public static final String SECRET_KEY = "xxx";
    public static final String VERSION = "v1";

  //  private BroadcastReceiver mRegistrationBroadcastReceiver;

    private CheckBox saveLoginCheckBox;
    private SharedPreferences loginPreferences;
    private SharedPreferences.Editor loginPrefsEditor;
    private Boolean saveLogin;    

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

        saveLoginCheckBox = (CheckBox)findViewById(R.id.checkBox);
        loginPreferences = getSharedPreferences("loginPrefs", MODE_PRIVATE);
        loginPrefsEditor = loginPreferences.edit();

        final EditText etEmail = (EditText) findViewById(R.id.etEmail);
        final EditText etPassword = (EditText) findViewById(R.id.etPassword);
        final Button bLogin = (Button) findViewById(R.id.bLogin);
        final TextView registerLink = (TextView) findViewById(R.id.tvRegisterHere);
        final TextView passwordLink = (TextView) findViewById(R.id.tvRePasswod);    

        saveLogin = loginPreferences.getBoolean("saveLogin", false);
        if (saveLogin == true) {
            etEmail.setText(loginPreferences.getString("email", ""));
            etPassword.setText(loginPreferences.getString("password", ""));
            saveLoginCheckBox.setChecked(true);
        }

  /*      mRegistrationBroadcastReceiver = new BroadcastReceiver() {
            @Override
            public void onReceive(Context context, Intent intent) {
                if(intent.getAction().endsWith(GCMRegistrationIntentService.REGISTRATION_SUCCESS)){
                    String token = intent.getStringExtra("token");
                    Toast.makeText(getApplicationContext(), "GCM token:" + token, Toast.LENGTH_LONG).show();
                }else if(intent.getAction().equals(GCMRegistrationIntentService.REGISTRATION_ERROR)){
                    Toast.makeText(getApplicationContext(), "GCM registration error!!", Toast.LENGTH_LONG).show();
                }
            }
        };*/

     /*   //Check status on google play device
        int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());
        if(ConnectionResult.SUCCESS != resultCode){
            //Check type of error
            if(GooglePlayServicesUtil.isUserRecoverableError(resultCode)){
                Toast.makeText(getApplicationContext(), "Google Play Service is not install/enabled in this device!", Toast.LENGTH_LONG).show();
                //So notification
                GooglePlayServicesUtil.showErrorNotification(resultCode, getApplicationContext());
            }else{
                Toast.makeText(getApplicationContext(), "This device does not support for Google Play Service!", Toast.LENGTH_LONG).show();
            }
        }else {
            //Start service
            Intent itent = new Intent(this, GCMRegistrationIntentService.class);
            startService(itent);
        }*/

        //regisztráció
        registerLink.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v) {
                Intent registerIntent = new Intent(LoginActivity.this, RegisterActivity.class);
                LoginActivity.this.startActivity(registerIntent);
            }
        });
        //jelszó emlékeztető
        passwordLink.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
               String mailforpsw = etEmail.getText().toString();
                Backendless.UserService.restorePassword(mailforpsw, new AsyncCallback&lt;Void&gt;()
                {
                    public void handleResponse( Void response )
                    {
                        Toast.makeText(getApplicationContext(),"Az új jelszó elküldve a megadott email címre!", Toast.LENGTH_SHORT).show();
                    }

                    public void handleFault( BackendlessFault fault )
                    {
                        Toast.makeText(getApplicationContext(),"Hiba!", Toast.LENGTH_SHORT).show();
                    }
                });
            }
        });

        //bejelentkezés
        bLogin.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View view) {
                InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
                imm.hideSoftInputFromWindow(etEmail.getWindowToken(), 0);

                String email = etEmail.getText().toString();
                String password = etPassword.getText().toString();

                if (saveLoginCheckBox.isChecked()) {
                    loginPrefsEditor.putBoolean("saveLogin", true);
                    loginPrefsEditor.putString("email", email);
                    loginPrefsEditor.putString("password", password);
                    loginPrefsEditor.commit();
                } else {
                    loginPrefsEditor.clear();
                    loginPrefsEditor.commit();
                }

               Backendless.UserService.login(email, password, new AsyncCallback&lt;BackendlessUser&gt;() {
                   @Override
                   public void handleResponse(BackendlessUser response) {
                       Toast.makeText(getApplicationContext(),"Sikeres bejelentlezés",Toast.LENGTH_SHORT).show();

                       Intent loginIntent = new Intent(LoginActivity.this, AimActivity.class);
                       LoginActivity.this.startActivity(loginIntent);
                   }

                   @Override
                   public void handleFault(BackendlessFault fault) {
                       Toast.makeText(getApplicationContext(),"Sikertelen bejelentlezés",Toast.LENGTH_SHORT).show();
                   }
               });
            }
        });

        Backendless.initApp(this, APP_ID, SECRET_KEY, VERSION);    
    }

    /*@Override
    protected void onResume() {
        super.onResume();
        Log.w("UserAreaActivity", "onResume");
        LocalBroadcastManager.getInstance(this).registerReceiver(mRegistrationBroadcastReceiver, new IntentFilter(GCMRegistrationIntentService.REGISTRATION_SUCCESS));
        LocalBroadcastManager.getInstance(this).registerReceiver(mRegistrationBroadcastReceiver, new IntentFilter(GCMRegistrationIntentService.REGISTRATION_ERROR));
    }

    @Override
    protected void onPause() {
        super.onPause();
        Log.w("UserAreaActivity", "onPause");
        LocalBroadcastManager.getInstance(this).unregisterReceiver(mRegistrationBroadcastReceiver);
    }*/
}
</code></pre>

<p>AimActivity</p>

<pre><code>package sgtt.celtkituzes_0_1;

import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;
import android.content.SharedPreferences;

import com.firebase.ui.database.FirebaseRecyclerAdapter;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;   

public class AimActivity extends AppCompatActivity implements
        GoogleApiClient.OnConnectionFailedListener{

    public static class AimViewHolder extends RecyclerView.ViewHolder{
        public TextView aimName;
        public TextView aimText;
        public TextView aimUrl;

        public AimViewHolder(View v){
            super(v);
            aimName = (TextView)itemView.findViewById(R.id.name);
            aimText = (TextView)itemView.findViewById(R.id.text);
            aimUrl = (TextView)itemView.findViewById(R.id.url);
        }
    }

    public static final String AIMS = "aims";
    private RecyclerView mAimRecyclerView;
    private LinearLayoutManager mLinearLayoutManager;

    public static DatabaseReference mFirebaseDatabaseReference;
    private FirebaseRecyclerAdapter&lt;AimToAim, AimViewHolder&gt; mFirebaseAdapter;

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

        mAimRecyclerView = (RecyclerView)findViewById(R.id.aimRecyclerView);
        mLinearLayoutManager = new LinearLayoutManager(this);
        mLinearLayoutManager.setStackFromEnd(true);
        mAimRecyclerView.setLayoutManager(mLinearLayoutManager);

        //Database Initialization
        mFirebaseDatabaseReference = FirebaseDatabase.getInstance().getReference();
        mFirebaseAdapter = new FirebaseRecyclerAdapter&lt;AimToAim, AimViewHolder&gt;(
                AimToAim.class,
                R.layout.activity_aim_to_aim,
                AimViewHolder.class,
                mFirebaseDatabaseReference.child(AIMS)) {
            @Override
            protected void populateViewHolder(AimViewHolder viewHolder, AimToAim model, int position) {
                viewHolder.aimName.setText(model.getName());
                viewHolder.aimText.setText(model.getText());
                viewHolder.aimUrl.setText(model.getUrl());
            }
        };   

        mFirebaseAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver(){
            @Override
            public void onItemRangeInserted(int positionStart, int itemCount){
                super.onItemRangeInserted(positionStart, itemCount);
                int aimCount = mFirebaseAdapter.getItemCount();
                int lastVisiblePosition = mLinearLayoutManager.findLastCompletelyVisibleItemPosition();
                if (lastVisiblePosition == -1 || (positionStart &gt;= (aimCount -1) &amp;&amp; lastVisiblePosition == (positionStart -1))){
                    mAimRecyclerView.scrollToPosition(positionStart);
                }
            }
        });
        mAimRecyclerView.setLayoutManager(mLinearLayoutManager);
        mAimRecyclerView.setAdapter(mFirebaseAdapter);
    }

    @Override
    public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {    
    }
}
</code></pre>

<p>AimToAim</p>

<pre><code>package sgtt.celtkituzes_0_1;

/**
 * Created by Storg on 2016.08.27..
 */
public class AimToAim {

    private String name;
    private String text;
    private String url;

    public AimToAim(){
    }
    public AimToAim(String name, String text, String url){
        this.name = name;
        this.text = text;
        this.url = url;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
</code></pre>

<p>activity_aim xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="sgtt.celtkituzes_0_1.AimActivity"&gt;

    &lt;android.support.v7.widget.RecyclerView
        android:id="@+id/aimRecyclerView"
        android:layout_width="match_parent"
        android:layout_height="match_parent" /&gt;

&lt;/RelativeLayout&gt;
</code></pre>

<p>AimToAim_xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="?android:attr/listPreferredItemHeightLarge"&gt;
    &lt;TextView
        android:id="@+id/name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        tools:text="Name"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:paddingLeft="16dp"/&gt;
    &lt;TextView
        android:id="@+id/text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        tools:text="Address"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:paddingLeft="16dp"/&gt;
    &lt;TextView
        android:id="@+id/url"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        tools:text="url"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:paddingLeft="16dp"/&gt;

&lt;/LinearLayout&gt;
</code></pre>