Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6962013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:36:18+00:00 2026-05-27T15:36:18+00:00

Why I am I getting this error on a standard Android Level 10 API

  • 0

Why I am I getting this error on a standard Android Level 10 API? I have created the simplest, shortest possible test case so I can paste the entire Android project below:

E/AndroidRuntime(  406): java.lang.UnsatisfiedLinkError: getDeclaredAnnotations
E/AndroidRuntime(  406):    at java.lang.Package.getDeclaredAnnotations(Native Method)
E/AndroidRuntime(  406):    at java.lang.Package.getDeclaredAnnotations(Package.java:107)
E/AndroidRuntime(  406):    at com.foobar.android.heartbeat.CustomAppWidgetProvider.onEnabled(CustomAppWidgetProvider.java:15)
E/AndroidRuntime(  406):    at android.appwidget.AppWidgetProvider.onReceive(AppWidgetProvider.java:73)

1. AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.foobar.android.cannotate"
    android:versionCode="1"
    android:versionName="1.0" >
    <uses-sdk android:minSdkVersion="10" />
    <application>
        <receiver android:name="com.foobar.android.cannotate.CustomAppWidgetProvider">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            </intent-filter>
            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/custom_app_widget_provider_info" />
        </receiver>
    </application>
</manifest>

2. src/com/foobar/android/cannotate/CustomAppWidgetProvider.java`

package com.foobar.android.heartbeat;
import java.lang.annotation.Annotation;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
import android.util.Log;

public class CustomAppWidgetProvider extends AppWidgetProvider {
    @Override
    public void onEnabled (Context context) {
        super.onEnabled(context);
        Log.d(getClass().getCanonicalName(), "about to get annotations");
        Annotation [] annotations = CustomAppWidgetProvider.class.getPackage().getDeclaredAnnotations();
        Log.d(getClass().getCanonicalName(), "annotations.length = " + annotations.length);
    }
}

3. res/xml/custom_app_widget_provider_info.xml

<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
    android:initialLayout="@layout/custom_app_widget"
    >
</appwidget-provider>

4. res/layout/custom_app_widget.xml

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >
    <TextView
        android:id="@+id/value"
        android:text="@string/empty"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        />
</FrameLayout>

5. res/values/strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="empty">-</string>
</resources>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:36:19+00:00Added an answer on May 27, 2026 at 3:36 pm

    The exception you are seeing is happening because the native code method for Package.getDeclaredAnnotations() is not implemented by the runtime system on the platform you are running.

    According to this android issue, Davlik currently doesn’t support Package annotations at all. The exception is a symptom of that.

    AFAIK, there’s nothing you can do about it except avoid using Package annotations. (And mobilize your friends and relatives to vote for the issue to be fixed!)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this HTML code: <td align=center> and I'm getting this error in Visual
I keep getting this error on my apache install. I have php module enabled
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler
Getting this error with jquery & jquery.form. Site has been live for awhile..upgraded to
Anyone getting this error when using the new free chart controls MS bought from
I´m getting this error while trying to commit to a svn repository: svn: MKACTIVITY
Keep getting this error after inserting a subdatasheet into a query and trying to
am getting this error when i open my site in internet explorer......... plz help
I am getting this error now that I hit version number 1.256.0: Error 4
I am getting this error when trying to run internet information services on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.