I'm new-ish to Android and Eclipse and am trying to figure out what could be going wrong with my of my Android project. Two days ago it worked fine, loaded onto the phone, all was happy. Without my having done (afair) anything other than clean and rebuild, I'm now getting the following notice:
09-29 11:19:45.148: W/System(16536): ClassLoader referenced unknown path: /data/app/com.example.blephello-2/lib/arm64
which leads to the following error:
09-29 10:51:35.343: E/AndroidRuntime(15470): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.example.blephello.BlepHello: make sure class name exists, is public, and has an empty constructor that is public
09-29 10:51:35.343: E/AndroidRuntime(15470): at android.app.Fragment.instantiate(Fragment.java:620)
09-29 10:51:35.343: E/AndroidRuntime(15470): at android.app.Fragment.instantiate(Fragment.java:584)
09-29 10:51:35.343: E/AndroidRuntime(15470): at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2192)
09-29 10:51:35.343: E/AndroidRuntime(15470): at android.app.FragmentController.onCreateView(FragmentController.java:98)
09-29 10:51:35.343: E/AndroidRuntime(15470): at android.app.Activity.onCreateView(Activity.java:5559)
09-29 10:51:35.343: E/AndroidRuntime(15470): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:754)
09-29 10:51:35.343: E/AndroidRuntime(15470): ... 21 more
09-29 10:51:35.343: E/AndroidRuntime(15470): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.blephello.BlepHello" on path: DexPathList[[zip file "/data/app/com.example.blephello-2/base.apk"],nativeLibraryDirectories=[/data/app/com.example.blephello-2/lib/arm64, /vendor/lib64, /system/lib64]]
For fun I've read this this this this this and a whole bunch of other questions that pertain to gradle settings, nothing has worked yet. Anyhow, when I look at my class and what's expected, e.g. com.example.blephello.BlepHello everything looks good:
package com.example.blephello;
import java.util.ArrayList;
import java.util.UUID;
import processing.core.PApplet;
import processing.core.PFont;
import blepdroid.Blepdroid;
import blepdroid.BlepdroidDevice;
public class BlepHello extends PApplet {
BlepdroidDevice test;
PFont fontA;
ArrayList<String> results;
boolean allSetUp = false;
public BlepHello()
{
}
I have the empty constructor required by the fragment. When I look at my dex bytecode I see the class listed there:
Class #817 -
Class descriptor : 'Lcom/example/blephello/BlepHello;'
Access flags : 0x0001 (PUBLIC)
Superclass : 'Lprocessing/core/PApplet;'
Interfaces -
Static fields -
Instance fields -
#0 : (in Lcom/example/blephello/BlepHello;)
name : 'allSetUp'
type : 'Z'
access : 0x0000 ()
#1 : (in Lcom/example/blephello/BlepHello;)
name : 'fontA'
type : 'Lprocessing/core/PFont;'
access : 0x0000 ()
#2 : (in Lcom/example/blephello/BlepHello;)
name : 'results'
type : 'Ljava/util/ArrayList;'
access : 0x0000 ()
#3 : (in Lcom/example/blephello/BlepHello;)
name : 'test'
type : 'Lblepdroid/BlepdroidDevice;'
access : 0x0000 ()
Direct methods -
#0 : (in Lcom/example/blephello/BlepHello;)
name : '<init>'
type : '()V'
access : 0x10001 (PUBLIC CONSTRUCTOR)
code -
registers : 2
ins : 1
outs : 1
insns size : 7 16-bit code units
catches : (none)
positions :
0x0000 line=39
0x0003 line=37
0x0006 line=42
locals :
0x0000 - 0x0007 reg=1 this Lcom/example/blephello/BlepHello;
So it is there, just not being picked up somehow? I do have the classes exported in Properties->Java Build Path->Order and Export. I've completely uninstalled the application with no better result. The activity is declared in the Manifest correctly (I think):
<activity
android:name=".FullscreenActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/app_name"
android:theme="@style/FullscreenTheme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
The activity itself is quite simple:
package com.example.blephello;
import com.example.blephello.util.SystemUiHider;
//import android.R;
import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.view.MotionEvent;
import android.view.View;
public class FullscreenActivity extends Activity {
However when I run Android Lint I see the following:
Class referenced in the manifest, com.example.blephello.FullscreenActivity, was not found in the project or the libraries AndroidManifest.xml
This makes me think that somewhere something is missing my class files, I'm just not sure what it could be. Any pointers on project/path/compile settings to look at further would be much appreciated.