このリンクlink1とlink2に示されているように、私は(APV pdfビューア)を使用しています
とにかくそれはうまくいきます。しかし、プロジェクトを通じてパッケージの名前を変更すると、次の例外が発生します。
09-10 22:02:35.936: E/AndroidRuntime(556): FATAL EXCEPTION: main
09-10 22:02:35.936: E/AndroidRuntime(556): java.lang.UnsatisfiedLinkError: parseFile
09-10 22:02:35.936: E/AndroidRuntime(556): at cx.hell.android.pdfviewIktab.PDF.parseFile(Native Method)
09-10 22:02:35.936: E/AndroidRuntime(556): at cx.hell.android.pdfviewIktab.PDF.<init>(PDF.java:87)
09-10 22:02:35.936: E/AndroidRuntime(556): at cx.hell.android.pdfviewIktab.OpenFileActivity.getPDF(OpenFileActivity.java:569)
09-10 22:02:35.936: E/AndroidRuntime(556): at cx.hell.android.pdfviewIktab.OpenFileActivity.startPDF(OpenFileActivity.java:530)
09-10 22:02:35.936: E/AndroidRuntime(556): at cx.hell.android.pdfviewIktab.OpenFileActivity.onCreate(OpenFileActivity.java:282)
09-10 22:02:35.936: E/AndroidRuntime(556): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-10 22:02:35.936: E/AndroidRuntime(556): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
09-10 22:02:35.936: E/AndroidRuntime(556): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
09-10 22:02:35.936: E/AndroidRuntime(556): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
09-10 22:02:35.936: E/AndroidRuntime(556): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
09-10 22:02:35.936: E/AndroidRuntime(556): at android.os.Handler.dispatchMessage(Handler.java:99)
09-10 22:02:35.936: E/AndroidRuntime(556): at android.os.Looper.loop(Looper.java:123)
09-10 22:02:35.936: E/AndroidRuntime(556): at android.app.ActivityThread.main(ActivityThread.java:4627)
09-10 22:02:35.936: E/AndroidRuntime(556): at java.lang.reflect.Method.invokeNative(Native Method)
09-10 22:02:35.936: E/AndroidRuntime(556): at java.lang.reflect.Method.invoke(Method.java:521)
09-10 22:02:35.936: E/AndroidRuntime(556): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-10 22:02:35.936: E/AndroidRuntime(556): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-10 22:02:35.936: E/AndroidRuntime(556): at dalvik.system.NativeStart.main(Native Method)
これはクラス(PDF.java)です:
package cx.hell.android.pdfviewIktab;
import java.io.File;
import java.io.FileDescriptor;
import java.util.List;
import cx.hell.android.lib.pagesview.FindResult;
public class PDF {
static {
System.loadLibrary("pdfview2");
}
public static class Size implements Cloneable {
public int width;
public int height;
public Size() {
this.width = 0;
this.height = 0;
}
public Size(int width, int height) {
this.width = width;
this.height = height;
}
public Size clone() {
return new Size(this.width, this.height);
}
}
private int pdf_ptr = -1;
private int invalid_password = 0;
public boolean isValid() {
return pdf_ptr != 0;
}
public boolean isInvalidPassword() {
return invalid_password != 0;
}
synchronized private native int parseFile(String fileName, int box, String password);
synchronized private native int parseFileDescriptor(FileDescriptor fd, int box, String password);
public PDF(File file, int box) {
// this is the line of (cx.hell.android.pdfviewIktab.OpenFileActivity.getPDF(OpenFileActivity.java:569))
this.parseFile(file.getAbsolutePath(), box, "");
}
public PDF(FileDescriptor file, int box) {
this.parseFileDescriptor(file, box, "");
}
synchronized public native int getPageCount();
synchronized public native int[] renderPage(int n, int zoom, int left, int top,
int rotation, boolean gray, boolean skipImages, PDF.Size rect);
synchronized public native int getPageSize(int n, PDF.Size size);
synchronized public native List<FindResult> find(String text, int page);
synchronized public native void clearFindResult();
synchronized public native List<FindResult> findOnPage(int page, String text);
synchronized private native void freeMemory();
public void finalize() {
try {
super.finalize();
} catch (Throwable e) {
}
this.freeMemory();
}
}
助けてください?前もって感謝します。