user6572634
user6572634

Reputation: 21

Error on androidmanifest file when using appcompat

I been using aide to start some project apps. And I have a problem in Android Manifest file that says "aapt: In generated file: Error unboung prefix". That happened after I replaced AppCompatActivity from Activity, changed the theme to @android:style/Theme.AppCompatLight.DarkActionBar.

I've also compile on build.gradle this.

compile 'com.android.support:appcompat-v7:24.2.0'

Here's the code from AndroidManifest file that contains error.

<?xml version="1.0" encoding="utf-8"?>

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

And here's the MainActivity class.

package com.mycompany.lenovoplus;

import android.os.*;
import android.support.v7.app.*;

public class MainActivity extends ActionBarActivity 
{
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}

Hope someone help.

Upvotes: 1

Views: 187

Answers (2)

DiLDoST
DiLDoST

Reputation: 372

The problem is with the Theme.

Replace:

@android:style/Theme.AppCompatLight.DarkActionBar

with:

@style/Theme.AppCompat.Light.DarkActionBar

Upvotes: 0

Fred Grott
Fred Grott

Reputation: 3476

change xml tag to a manifest tag:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.github.shareme.gwsfluidx">

replace my packagename with yours

Upvotes: 0

Related Questions