I cannot see why I'm getting this error? I'm certain my Gradle file and java class are up to par. Class and gradle file posted below. Also, I have no errors in my XML files.
What I have done already:
File > Invalid Caches/Restart
Build > Clean Project
Build > Rebuild Project Restart computer
These are the things that were suggested to do throughout the web but none of them worked.
SplashActivity.java
package com.apress.gerber.currencies;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class SplashActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
// Letter "R" is red
setContentView(R.layout.activity_splash2);
}
}
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.1'
useLibrary 'org.apache.http.legacy' // newly added
defaultConfig {
applicationId "com.apress.gerber.currencies"
minSdkVersion 9
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
// newly added
compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
// newly added
provided 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:<version number>'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.1'
testCompile 'junit:junit:4.12'
}