FractalBob
FractalBob

Reputation: 3554

Getting 'java.lang.UnsatisfiedLinkError: Native method not found: ' on setSupportActionBar() for Toolbar

After getting past the earlier problem (Getting 'The method setSupportActionBar(Toolbar) in the type AppCompatActivity is not applicable for the arguments (Toolbar)' in my AppCompatActivity), now setSupportActrionBar() is crashing. Again, here is the relevant code:

import android.support.v7.widget.Toolbar;

public class FivetoGo extends AppCompatActivity {
@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setContentView(R.layout.main);

    Toolbar mToolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(mToolbar);
                .
                .
                .

and the layout:

<?xml version='1.0' encoding='UTF-8' ?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <android.support.v7.widget.Toolbar 
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#ff6d7fe2"
        android:minHeight="?android:attr/actionBarSize"
        app:contentInsetEnd="0dp"
        app:contentInsetStart="0dp" >
    </android.support.v7.widget.Toolbar>
                        .
                        .
                        .
</RelativeLayout>

Upvotes: 0

Views: 56

Answers (1)

FractalBob
FractalBob

Reputation: 3554

It turns out that all I needed was to change the parent theme from Theme.AppCompat.Light to Theme.AppCompat.Light.NoActionBar.

Upvotes: 1

Related Questions