0

Situation

Aviary-SDK included as library. Everything worked fine up to yesterday after i tried setting up the billing system and updating the SDK and ADT (where Eclipse got a new look including the old loading screen, but everything still appears to be loading). Now, it won't work anymore with displayed errors. When adding the Aviary-SDK to the project-build path, i still get errors but can run the project until i try to open up the Aviary-Editor.

Nevertheless, the sample application appears to be working. I tried copying the most important parts of the manifest and the res/values without any visible effect.

Errors

06-18 13:40:49.687: E/Trace(1926): error opening trace file: No such file or directory (2)
06-18 13:40:50.178: E/AndroidRuntime(1926): FATAL EXCEPTION: main
06-18 13:40:50.178: E/AndroidRuntime(1926): java.lang.RuntimeException: Unable to instantiate receiver com.XXX.XXX.library.receivers.AviarySystemReceiver: java.lang.ClassNotFoundException: Didn't find class "com.XXX.XXX.library.receivers.AviarySystemReceiver" on path: /data/app/com.XXX.XXX-1.apk
06-18 13:40:50.178: E/AndroidRuntime(1926):     at android.app.ActivityThread.handleReceiver(ActivityThread.java:2357)
06-18 13:40:50.178: E/AndroidRuntime(1926):     at android.app.ActivityThread.access$1500(ActivityThread.java:141)
06-18 13:40:50.178: E/AndroidRuntime(1926):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1310)
06-18 13:40:50.178: E/AndroidRuntime(1926):     at android.os.Handler.dispatchMessage(Handler.java:99)
06-18 13:40:50.178: E/AndroidRuntime(1926):     at android.os.Looper.loop(Looper.java:137)
06-18 13:40:50.178: E/AndroidRuntime(1926):     at android.app.ActivityThread.main(ActivityThread.java:5039)
06-18 13:40:50.178: E/AndroidRuntime(1926):     at java.lang.reflect.Method.invokeNative(Native Method)
06-18 13:40:50.178: E/AndroidRuntime(1926):     at java.lang.reflect.Method.invoke(Method.java:511)
06-18 13:40:50.178: E/AndroidRuntime(1926):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
06-18 13:40:50.178: E/AndroidRuntime(1926):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
06-18 13:40:50.178: E/AndroidRuntime(1926):     at dalvik.system.NativeStart.main(Native Method)
06-18 13:40:50.178: E/AndroidRuntime(1926): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.XXX.XXX.library.receivers.AviarySystemReceiver" on path: /data/app/com.XXX.XXX-1.apk
06-18 13:40:50.178: E/AndroidRuntime(1926):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
06-18 13:40:50.178: E/AndroidRuntime(1926):     at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
06-18 13:40:50.178: E/AndroidRuntime(1926):     at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
06-18 13:40:50.178: E/AndroidRuntime(1926):     at android.app.ActivityThread.handleReceiver(ActivityThread.java:2352)
06-18 13:40:50.178: E/AndroidRuntime(1926):     ... 10 more
06-18 13:40:53.336: E/Trace(1956): error opening trace file: No such file or directory (2)
06-18 13:40:53.656: E/dalvikvm(1956): Could not find class 'com.aviary.android.feather.FeatherActivity', referenced from method com.XXX.XXX.MainActivity.invokeavary

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.XXX.XXX"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto"  >

<uses-feature android:name="android.hardware.camera" />

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


<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />

<application
    android:hardwareAccelerated="true"
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/Theme.Sherlock.Light"
    android:largeHeap="true" >

    <activity
        android:name="com.XXX.XXX.MainActivity"
        android:label="@string/app_name" >

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.PICK" /> 
            <category android:name="android.intent.category.DEFAULT"  /> 
            <category android:name="android.intent.category.OPENABLE" />
            <data android:mimeType="image/*" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.SEND" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.OPENABLE" />
            <data android:mimeType="image/*" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.GET_CONTENT" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.OPENABLE" />
            <data android:mimeType="image/*" />
        </intent-filter>
    </activity>

    <activity android:name=".creator" />
    <activity android:name=".recently" />

    <!-- 
    AVIARY FEATHER ENTRIES
     -->

     <activity
        android:name="com.aviary.android.feather.FeatherActivity"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:theme="@style/FeatherDefaultTheme.Custom"
        android:process=":standalone" />       

    <receiver
        android:name="com.XXX.XXX.library.receivers.AviarySystemReceiver"
        android:exported="true"
        android:process=":aviary_sample_system_receiver" >
        <intent-filter>
            <action android:name="android.intent.action.PACKAGE_ADDED" />
            <action android:name="android.intent.action.PACKAGE_REMOVED" />
            <action android:name="android.intent.action.PACKAGE_REPLACED" />
            <data android:scheme="package" />
        </intent-filter>            
    </receiver>

    <provider 
        android:name="com.aviary.android.feather.library.providers.FeatherContentProvider"
        android:exported="false"
        android:authorities="com.XXX.XXX.HiResProvider"
        android:process=":standalone">
    </provider>

</application>

James Cameron
  • 1,681
  • 25
  • 40
  • 1
    Make sure your "Order & Export" section of the build path is correct: http://stackoverflow.com/questions/16596969/libraries-do-not-get-added-to-apk-anymore-after-upgrade-to-adt-22/16596990#16596990 – CommonsWare Jun 18 '13 at 14:18
  • Thanks for the good instructions, were looking for it. The app now runs and i can call the aviary editor. Nevertheless, i still get the error and a crash report – James Cameron Jun 18 '13 at 14:31
  • 1
    Is the Aviary SDK JAR in `libs/`? – CommonsWare Jun 18 '13 at 14:32
  • No, the Aviary-SDK Jar is in the folders Android Dependancies (aviary-sdk.jar) , Android Private Libraries (aviary-library.jar,aviary-headless-library.jar). – James Cameron Jun 18 '13 at 14:34
  • Those are entries in the Build Path dialog in Eclipse. I am referring to the file system of your development computer. Your Android project should have a `libs/` directory, just off the project root. Third-party JARs belong in this directory, and nowhere else. If your Aviary JAR is located somewhere else, please undo any manual changes you made to the build path, then move that JAR into `libs/`. Otherwise, the JAR's contents will not be packaged into the APK. – CommonsWare Jun 18 '13 at 14:36
  • The library has been added via Right click -> Properties -> Android -> Library: "Add"-Dialog. It looks legit and fixes any problems with Eclipse importing files from the library. That doesn't appears to be the problem but i'll try. – James Cameron Jun 18 '13 at 14:39
  • Ah, sorry, didn't realize that this was an Android library project. What you have is probably fine then, at least in terms of code location. – CommonsWare Jun 18 '13 at 14:46

1 Answers1

1

Looks like the problem occured because i changed the receiver-name to my own path (com.XXX.XXX.* instead of com.aviary.android.*) for testing purposes after the update ruined the ADT.

Now that i followed @CommonsWare's URL to the instructions to repair the ADT after update 22 and changed it back to com.aviary.android.*, it works fine.

Community
  • 1
  • 1
James Cameron
  • 1,681
  • 25
  • 40