导入FragmentActivity时,Activity显示错误。
import android.support.v4.app.FragmentActivity;
import android.text.TextUtils;
import android.widget.TextView;
import java.util.ArrayList;
public class DetailActivity extends FragmentActivity
我的build.gradle文件
apply plugin: 'android'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
minSdkVersion 8
targetSdkVersion 23
versionCode 3
versionName "1.0.2"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:23.1.0'
compile 'com.android.support:appcompat-v7:23.1.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.android:support-v4:r7'
}
答案 0 :(得分:1)
在第一次
删除不必要的
compile 'com.google.android:support-v4:r7' // No Need
然后 Clean-Rebuild and Do Gradle
您的项目