0

I've trying create an app which is need Toolbar. I've already add "appcompat_v7.jar" to my project which I've got no result.

I've already review some links below and they couldn't help so.

The Import android.support.v7 cannot be resolved

The import android.support.v7.app cannot be resolved

The Import android.support.v7 cannot be resolved

Here is my "AndroidManifect":

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.tabex"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="21" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

Also image from Eclipse:

enter image description here

enter image description here

As you can see other import from v7 works but the Toolbar not. I've really appropriate your help.

Community
  • 1
  • 1
SDG69
  • 161
  • 1
  • 4
  • 19
  • are you able to import import android.support.v7.app.AppCompatActivity – bond007 Nov 14 '15 at 17:43
  • may be u r using old JAR since ActionBaractivity is depracated – bond007 Nov 14 '15 at 17:44
  • Try to extend MainActivity to AppCompatActivity – bond007 Nov 14 '15 at 17:45
  • @Zero : I can't add import android.support.v7.app.AppCompatActivity. For old version you've said I've upload my SDK Manager and don't think its old. – SDG69 Nov 14 '15 at 18:18
  • try to decompile that support jar and check whether it contains Toolbar or not – bond007 Nov 14 '15 at 18:24
  • I dono howto this, but do you know where i could find one of them which you sure have this Toolbar, link,address... – SDG69 Nov 14 '15 at 18:37
  • try to change your targetsdkversion to 23 which is the latest one – bond007 Nov 14 '15 at 18:39
  • I've tried that and unfortunatly not worked. Is it possible for you to create one empty project with eclipse and add this lib to it and sent it my email( sadegh69@gmail.com ).Thanks alot... – SDG69 Nov 14 '15 at 19:20

2 Answers2

2

Looking at your SDK Manager screenshot, you are using an old version of the Support Library. The Toolbar widget did not get introduced until v21, you are using v20. Upgrade to latest.

phxhawke
  • 2,581
  • 23
  • 17
0

I've Upgrade my Android Support Library to Latest version which is 23.0.1 and It's work hundred percent.

SDG69
  • 161
  • 1
  • 4
  • 19