我在 Android 方面没有经验,我正在尝试使用三星 S-Pen SDK 2.3 创建一个非常简单的应用程序。我正在关注三星开发者网站上的本教程。当我实现最基本的示例时,我收到以下错误。
WARNING: Could not load libjni_secime natives
No implementation found for native Lcom/bst/HwBeautify/BeautifyNative;.nativeCBInitEngine:()I
threadid=11: thread exiting with uncaught exception (group=0x41a242a0)
...
FATAL EXCEPTION: Thread-1829
java.lang.UnsatisfiedLinkError: Native method not found: com.bst.HwBeautify.BeautifyNative.nativeCBInitEngine:()
at com.bst.HwBeautify.BeautifyNative.nativeCBInitEngine(Native Method)
at com.bst.HwBeautify.BeautifyNative.cbInitEngine(SourceFile:107)
at com.bst.HwBeautify.BeautifyManager.b(SourceFile:87)
at com.bst.HwBeautify.BeautifyManager.a(SourceFile:85)
at com.bst.HwBeautify.BeautifyManager$1.run(SourceFile:64)
at java.lang.Thread.run(Thread.java:856)
...
S-Canvas is not created yet. Call "changeModeTo" in onInitialized() of SCanvasInitializeListener or call it after onInitialized() SCanvasLayout is up to been initailized
... No implementation found for native Lcom/bst/HwBeautify/BeautifyNative;.nativeCBInitEngine:()I threadid=16: thread exiting with uncaught exception (group=0x41a242a0)
这里是应该初始化画布的活动的整个代码:
package com.example.canvastest;
import com.samsung.spensdk.SCanvasView;
import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.view.Menu;
import android.widget.RelativeLayout;
public class CanvasSpace extends Activity {
private Context mContext;
private RelativeLayout mCanvasContainer;
private SCanvasView mSCanvas;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_canvas_space);
mContext = this;
mCanvasContainer = (RelativeLayout) findViewById(R.id.canvas_container);
mSCanvas = new SCanvasView(mContext);
mCanvasContainer.addView(mSCanvas);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.canvas_space, menu);
return true;
}
}
这是我的布局:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".CanvasSpace" >
<RelativeLayout
android:id="@+id/canvas_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center">
</RelativeLayout>
</RelativeLayout>
我担心的是这个非常奇怪的S_Pen_SDK2.3
文件夹结构。我有带路径的文件名(705 项),而不是普通目录。
我从来没有见过这样的事情。为什么有人会做这样的事情?像这样构造文件夹有什么好处吗?无论如何,我按照教程进行操作,我引用了库并将文件包含在armeabi
指定的文件夹中。
这是我的包资源管理器的视图:
我在网上搜索了一个关于三星开发人员的帖子,可以解决这个问题,但对我来说没有帮助。到目前为止,我尝试的是在文件armeabi
夹中的文件名之前删除这些路径,但这没有帮助。如果有人给我一些关于如何让它工作的提示,那将对我很有帮助。我包含了这么多明显的代码和屏幕截图,以完全清楚我的项目中有什么。