Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unresolved package "generated" in AndroidManifest.xml

In my Android Studio androidManifest.xml file, I found an unresolved package generated. How can I fix it?

The issued code is : android:name=".provider.generated.SquawkProvider

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.aaa">

<uses-permission android:name="android.permission.INTERNET" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

<activity
    android:name=".MainActivity">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

<provider
    android:name=".provider.generated.SquawkProvider"
     <!--  shows unresolved package "generated" -->

    android:authorities="com.example.android.aaa.provider.provider"
    android:exported="false" >
</provider>

<activity
    android:name=".following.FollowingPreferenceActivity"
    android:parentActivityName=".MainActivity">
    <meta-data
        android:name="android.support.PARENT_ACTIVITY"
        android:value=".MainActivity" />
</activity>

<service
    android:name=".fcm.MyFirebaseMessagingService">
    <intent-filter>
        <action android:name="com.google.firebase.MESSAGING_EVENT"/>
    </intent-filter>
</service>

</application>
</manifest>
like image 243
CodeFaber Avatar asked Oct 03 '17 04:10

CodeFaber


1 Answers

This issue stems from annotation processing now being included in Gradle from version 2.2. You can fix project and get it running with the following changes.

Project level "build.gradle" remove this line:

classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2'

App level "build.gradle" remove this line:

apply plugin: 'android-apt'

and change this line replacing apt with annotationProcessor:

apt 'net.simonvt.schematic:schematic-compiler:0.6.3'
like image 87
Cassie Avatar answered Sep 20 '22 02:09

Cassie