This problem was not solved by the linked post. So please do not mark this one as a duplicate and ignore this post. Something else is causing the issue.
I've tried the method that was supposed to solve this problem through this post:Upgraded to AppCompat v22.1.0 and now getting IllegalArgumentException: AppCompat does not support the current theme features My problem wasn't solved and I'm not sure what else could be causing the problem
Here is my error code:
05-13 10:22:08.877: E/AndroidRuntime(21609): FATAL EXCEPTION: main
05-13 10:22:08.877: E/AndroidRuntime(21609): Process: com.commonsware.lorem, PID: 21609
05-13 10:22:08.877: E/AndroidRuntime(21609): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.commonsware.lorem/com.commonsware.lorem.Lorem}: java.lang.IllegalArgumentException: AppCompat does not support the current theme features
05-13 10:22:08.877: E/AndroidRuntime(21609): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2198)
05-13 10:22:08.877: E/AndroidRuntime(21609): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
05-13 10:22:08.877: E/AndroidRuntime(21609): at android.app.ActivityThread.access$800(ActivityThread.java:139)
05-13 10:22:08.877: E/AndroidRuntime(21609): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
05-13 10:22:08.877: E/AndroidRuntime(21609): at android.os.Handler.dispatchMessage(Handler.java:102)
05-13 10:22:08.877: E/AndroidRuntime(21609): at android.os.Looper.loop(Looper.java:136)
05-13 10:22:08.877: E/AndroidRuntime(21609): at android.app.ActivityThread.main(ActivityThread.java:5097)
05-13 10:22:08.877: E/AndroidRuntime(21609): at java.lang.reflect.Method.invokeNative(Native Method)
05-13 10:22:08.877: E/AndroidRuntime(21609): at java.lang.reflect.Method.invoke(Method.java:515)
05-13 10:22:08.877: E/AndroidRuntime(21609): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
05-13 10:22:08.877: E/AndroidRuntime(21609): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
05-13 10:22:08.877: E/AndroidRuntime(21609): at dalvik.system.NativeStart.main(Native Method)
05-13 10:22:08.877: E/AndroidRuntime(21609): Caused by: java.lang.IllegalArgumentException: AppCompat does not support the current theme features
05-13 10:22:08.877: E/AndroidRuntime(21609): at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:360)
05-13 10:22:08.877: E/AndroidRuntime(21609): at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:246)
05-13 10:22:08.877: E/AndroidRuntime(21609): at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
05-13 10:22:08.877: E/AndroidRuntime(21609): at com.commonsware.lorem.Lorem.onCreate(Lorem.java:35)
05-13 10:22:08.877: E/AndroidRuntime(21609): at android.app.Activity.performCreate(Activity.java:5248)
05-13 10:22:08.877: E/AndroidRuntime(21609): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
05-13 10:22:08.877: E/AndroidRuntime(21609): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
05-13 10:22:08.877: E/AndroidRuntime(21609): ... 11 more
Here is my styles.xml:
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
<style name="AppTheme.NoActionBar" parent="AppTheme">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
</resources>
Here is my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.commonsware.lorem" >
//Permissions
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name=".Lorem"
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=".PostActivity"
android:label="Post" >
<intent-filter>
<action android:name="getextras" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".LocationActivity"
android:label="Location" />
<activity
android:name=".TopicActivity"
android:label="Topic" />
<activity
android:name=".LoginActivity"
android:label="Login" />
<activity
android:name=".RegisterActivity"
android:label="@string/title_activity_register" >
</activity>
</application>
</manifest>
Here is my Lorem (MainActivity):
package com.commonsware.lorem;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.parse.Parse;
import com.parse.ParseObject;
import com.parse.ParseUser;
public class Lorem extends ActionBarActivity {
//private static final String="POST";
ListView listView;
int[] pic_thumbnail_resource = {R.mipmap.ic_launcher, R.mipmap.ic_launcher, R.mipmap.ic_launcher, R.mipmap.ic_launcher,
R.mipmap.ic_launcher, R.mipmap.ic_launcher,};
String[] post_ratings;
String[] post_titles;
PostAdapter adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_lorem);
super.onCreate(savedInstanceState);
//setContentView(R.layout.activity_lorem);
// Parse
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
Parse.initialize(this, "wHN7DSZyAzVXT5xs5ASDFOBwOWasUExbeuePvQvL", "SsLuJ7e97FsRTCcI12XI7dlv8RilgSoFSw5waIOXM");
//ParseObject testObject = new ParseObject("TestObject");
//testObject.put("foo", "bar");
//testObject.saveInBackground();
ParseUser currentUser = ParseUser.getCurrentUser();
if (currentUser != null) {
// do stuff with the user
} else {
// show the signup or login screen
Intent takeUsertoLogin = new Intent(this, LoginActivity.class);
startActivity(takeUsertoLogin);
}
// End Parse
listView = (ListView)findViewById(R.id.list_view);
post_ratings = getResources().getStringArray(R.array.post_ratings);
post_titles = getResources().getStringArray(R.array.post_titles);
//populateListView();
registerClickCallback();
int i = 0;
adapter = new PostAdapter(getApplicationContext(),R.layout.row_layout);
listView.setAdapter(adapter);
for(String titles: post_titles)
{
PostDataProvider dataProvider = new PostDataProvider(pic_thumbnail_resource[i], titles, post_ratings[i]);
adapter.add(dataProvider);
i++;
}
}
private void registerClickCallback(){
ListView list = (ListView) findViewById(R.id.list_view);
list.setOnItemClickListener(new AdapterView.OnItemClickListener(){
@Override
public void onItemClick(AdapterView<?> parent, View viewClicked, int position, long id){
TextView textView = (TextView) viewClicked;
String message = "You clicked # " + position + ",which is string: " + textView.getText().toString();
Toast.makeText(Lorem.this, message, Toast.LENGTH_LONG).show();
}
});
}
/*
@Override
public void onActivityResult(String requestCode, String resultCode, Intent data){
if (requestCode == "POST")
{
myItems.add
}
super.onActivityResult(requestCode, resultCode, data);
}
*/
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_lorem, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
super.onOptionsItemSelected(item);
switch (item.getItemId()){
case R.id.post:
aboutItemPost();
break;
case R.id.location:
aboutItemLocation();
break;
case R.id.topic:
aboutItemTopic();
break;
case R.id.sort:
aboutItemSort();
break;
case R.id.login:
aboutItemLogin();
case R.id.Register:
aboutItemRegister();
case R.id.Logout:
aboutItemLogout();
}
return true;
}
private void aboutItemPost(){
Intent intent = new Intent(getApplicationContext(), PostActivity.class);
startActivityForResult(intent, 0);
}
private void aboutItemLocation(){
Intent intent = new Intent(getApplicationContext(), LocationActivity.class);
startActivityForResult(intent, 0);
}
private void aboutItemTopic(){
Intent intent = new Intent(getApplicationContext(), TopicActivity.class);
startActivityForResult(intent, 0);
}
private void aboutItemSort(){
new AlertDialog.Builder(this)
.setTitle("Sort")
.setMessage("This is where the user will sort what they want to see")
.setNeutralButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
}).show();
}
private void aboutItemLogin(){
Intent takeUsertoLogin = new Intent(this, LoginActivity.class);
startActivity(takeUsertoLogin);
}
private void aboutItemRegister(){
Intent intent = new Intent(getApplicationContext(), RegisterActivity.class);
startActivityForResult(intent, 0);
}
private void aboutItemLogout() {
// log the user out
ParseUser.logOut();
// take the user back to log in screen
Intent takeUsertoLogin = new Intent(this, LoginActivity.class);
startActivity(takeUsertoLogin);
}
}
As you can see the method I tried did not solve the error code so something else is causing the error here, hopefully someone smart can figure out what is causing the issue.
If you need any more code feel free to ask.
Thank you for your time.