java - Class or interface expected - Provider name -
i'm trying declare content provider class in manifest shows me error when type name of qualified name of provider class:
the error class or interface expected, mean?
the error @ line: android:name="com.sns.awesomecharactercreator.characterprovider" there red line underit , when hover on says class or interface expected
here code:
<?xml version="1.0" encoding="utf-8"?> <!--suppress --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sns.awesomecharactercreator" > <application android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <activity android:name=".welcome" 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=".editingcharacter" android:label="@string/title_activity_general_characteristics" android:parentactivityname=".notes" > </activity> <provider android:authorities="com.sns.awesomecharactercreator.characterprovider" android:name="com.sns.awesomecharactercreator.characterprovider" android:exported="false" /> </application>
characterprovider class:
package com.sns.awesomecharactercreator; import android.content.contentvalues; import android.content.urimatcher; import android.database.cursor; import android.database.sqlite.sqlitedatabase; import android.net.uri; import datalayer.dbhelper; public class characterprovider extends android.content.contentprovider { private final static string authority = "com.sns.awesomecharactercreator.characterprovider"; private final static string base_path = "characterattributes"; public final static uri content_uri = uri.parse("content://" + authority + "/" + base_path); private static final int characters = 1; private static final int characters_id = 2; private static final urimatcher urimatcher = new urimatcher(urimatcher.no_match); static { urimatcher.adduri(authority, base_path, characters); urimatcher.adduri(authority, base_path + "/#", characters_id); } private static final string[] allcolumns = { dbhelper.characterattributes_id, dbhelper.characterattributes_name, dbhelper.characterattributes_meaning, dbhelper.characterattributes_nickname, dbhelper.characterattributes_religion, dbhelper.characterattributes_birthdate, dbhelper.characterattributes_birthplace, dbhelper.characterattributes_sign, dbhelper.characterattributes_talents, dbhelper.characterattributes_mainsec, dbhelper.characterattributes_weapons, dbhelper.characterattributes_classs, dbhelper.characterattributes_strengths, dbhelper.characterattributes_weaknesses, dbhelper.characterattributes_role, dbhelper.characterattributes_voice, dbhelper.characterattributes_secrets, dbhelper.characterattributes_profession, dbhelper.characterattributes_quote, dbhelper.characterattributes_age, dbhelper.characterattributes_bodytype, dbhelper.characterattributes_height, dbhelper.characterattributes_weight, dbhelper.characterattributes_faceshape, dbhelper.characterattributes_eyecolor, dbhelper.characterattributes_haircolor, dbhelper.characterattributes_hairstyle, dbhelper.characterattributes_specialfeatures, dbhelper.characterattributes_health, dbhelper.characterattributes_disabilities, dbhelper.characterattributes_skintone, dbhelper.characterattributes_accesories, dbhelper.characterattributes_clothes, dbhelper.characterattributes_alookalike, dbhelper.characterattributes_ethnicity, dbhelper.characterattributes_iqlevel, dbhelper.characterattributes_education, dbhelper.characterattributes_dominantmood, dbhelper.characterattributes_moralcodes, dbhelper.characterattributes_desires, dbhelper.characterattributes_dislikes, dbhelper.characterattributes_attitudes, dbhelper.characterattributes_emotionhandling, dbhelper.characterattributes_qualities, dbhelper.characterattributes_flaws, dbhelper.characterattributes_goals, dbhelper.characterattributes_popularity, dbhelper.characterattributes_reputation, dbhelper.characterattributes_charisma, dbhelper.characterattributes_relatives, dbhelper.characterattributes_companions, dbhelper.characterattributes_lovelife, dbhelper.characterattributes_notes}; private sqlitedatabase db; @override public boolean oncreate() { dbhelper helper = new dbhelper(getcontext()); db = helper.getwritabledatabase(); return true; } @override public cursor query(uri uri, string[] projection, string selection, string[] selectionargs, string sortorder) { return db.query(dbhelper.table_characterattributes, allcolumns, selection, null, null, null, null); } @override public string gettype(uri uri) { return null; } @override public uri insert(uri uri, contentvalues values) { long id = db.insert(dbhelper.table_characterattributes, null, values); return uri.parse(base_path + "/#" + id); } @override public int delete(uri uri, string selection, string[] selectionargs) { return db.delete(dbhelper.table_characterattributes, selection, selectionargs); } @override`enter code here` public int update(uri uri, contentvalues values, string selection, string[] selectionargs) { return db.update(dbhelper.table_characterattributes,values,selection,selectionargs); } }
could dear , me here? i'm stuck forever , i'm ripping hair off.
Comments
Post a Comment