gpt4 book ai didi

android - import android.support.v7.app无法解决

转载 作者:行者123 更新时间:2023-11-30 02:08:32 31 4
gpt4 key购买 nike

导入时出现无法解决的错误android.support.v7.app.Fragment.

我尝试了在不同线程中给出的所有解决方案。我遗漏了什么请帮助。

  1. 我已经下载了 android 支持库。
  2. minSdkVersion 14 targetSdkVersion 14
  3. 添加依赖库

    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.1.1'
    compile 'com.android.support:support-v4:22.1.1'
    }
  4. 同步 build.gradle 文件(右击文件 --> 同步'build.gradle') 和清理你的项目 (Build --> Clean Project) 改变后。

我仍然无法重新爱这个。请帮忙

build.gradle(Module: app)

    apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
applicationId "com.example.android.effectivenavigation"
minSdkVersion 14
targetSdkVersion 14
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.android.support:support-v4:22.1.1'
}

AndroidManifest.xml

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.effectivenavigation"
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="14" />

<application android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:theme="@android:style/Theme.Holo.Light.DarkActionBar">

<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>

<activity android:name=".CollectionDemoActivity" android:label="@string/demo_collection" />

</application>
</manifest>

最佳答案

替换

 import android.support.v7.app.NotificationCompat;

 import android.support.v4.app.NotificationCompat;

关于android - import android.support.v7.app无法解决,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30423240/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com