AdvancedAndroid_Squawker icon indicating copy to clipboard operation
AdvancedAndroid_Squawker copied to clipboard

Error in Provider (Manifest file)

Open amatanat opened this issue 9 years ago • 8 comments

Hello,

I cannot run the app on a device. It gives Unable to get provider error. In Manifest file, it shows 'android:name' inside provider tag in red color with this error: Unresolved package 'generated' . Can you please let me know how to solve this error?

Thanks, Matanat

amatanat avatar Aug 29 '17 17:08 amatanat

Same here

Briciovh avatar Aug 29 '17 18:08 Briciovh

same here

aceisScope avatar Sep 03 '17 09:09 aceisScope

According the Schematic's official github site, when you want to use the library you need to add these lines in the app's gradle script.

dependencies { annotationProcessor 'net.simonvt.schematic:schematic-compiler:{latest-version}' compile 'net.simonvt.schematic:schematic:{latest-version}' }

You need to replace 'apt' to 'annotationProcessor'. This could solve the issue.

------Above solution only solved the build issues. It doesn't solve the root of the problem.------

https://github.com/SimonVT/schematic/issues/6 https://github.com/SimonVT/schematic/issues/12

You could find similar issues in the Schematic's official github site. I'm also trying to solve this. I'll let you know when I'm done :(

Violet-Bora-Lee avatar Sep 22 '17 08:09 Violet-Bora-Lee

@Violet-Bora-Lee its not work

wxjer avatar Sep 29 '17 08:09 wxjer

I was able to build this successfully after removing the apt dependences and making the same changes as @Violet-Bora-Lee build.gradle: -classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2' app/build.gradle: -apply plugin: 'android-apt'

bluestealth avatar Oct 24 '17 01:10 bluestealth

By replacing 'apt' to 'annotationProcessor' in a module level build.gradle file my error is also solved. I was also getting an error with the gradle version, in a project level build.gradle file. I have changed the version to 2.3.2.

dependencies { classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2' classpath 'com.android.tools.build:gradle:3.0.0-beta1' - changed it to 2.3.2

....}

amatanat avatar Oct 24 '17 13:10 amatanat

Thanks @amatanat for rising the issue and @Violet-Bora-Lee for your correct answer :) #loveAndroidDevCommunity

ghost avatar Oct 26 '17 13:10 ghost

Just to highlight and summarize 'annotationProcessor' has replaced 'apt', so "apply plugin: 'com.android-apt'" must be removed and all 'apt' instances must be migrated to there corresponding 'annotationProcessor' counterparts in build.gradle files.

Jantzilla avatar May 16 '18 10:05 Jantzilla