AngularJS 2与ASPNET MVC 5

时间:2015-10-07 09:37:58

标签: angularjs asp.net-mvc angular

是否可以在ASP.NET MVC项目中引用AngularJS 2(alpha版本)?我尝试引用以下内容

public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
    final Mat rgba = inputFrame.rgba();
    Core.flip(rgba, rgba, 1);

    if (data == null) {
        data = new byte[(int)rgba.total() * rgba.channels()];
    }

    rgba.get(0,0, data);
    record(data);
    return rgba;
}

public void record(byte[] data) {

    if (audioRecord == null || audioRecord.getRecordingState() != AudioRecord.RECORDSTATE_RECORDING) {
        startTime = System.currentTimeMillis();
        return;
    }

    int i = imagesIndex++ % images.length;
    Frame yuvImage = images[i];
    timestamps[i] = 1000 * (System.currentTimeMillis() - startTime);

    /* get video data */
    if (yuvImage != null && recording) {
        ((ByteBuffer) yuvImage.image[0].position(0)).put(data);

        try {
            Log.v(TAG, "Writing Frame");
            long t = 1000 * (System.currentTimeMillis() - startTime);

            if (t > recorder.getTimestamp()) {
                recorder.setTimestamp(t);
            }

            recorder.record(yuvImage);
        } catch (FFmpegFrameRecorder.Exception e) {
            Log.v(TAG, e.getMessage());
            e.printStackTrace();
        }
    }
}

但我仍然得到:

  

未捕获的ReferenceError:未定义角度

我在加载AngularJS 2后加载我的控制器

FATAL EXCEPTION: main
E/AndroidRuntime: Process: com.yceo.anlatbana, PID: 17622
E/AndroidRuntime: java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil
E/AndroidRuntime:     at java.lang.Class.classForName(Native Method)
E/AndroidRuntime:     at java.lang.Class.forName(Class.java:309)
E/AndroidRuntime:     at org.bytedeco.javacpp.Loader.load(Loader.java:390)
E/AndroidRuntime:     at org.bytedeco.javacpp.Loader.load(Loader.java:358)
E/AndroidRuntime:     at org.bytedeco.javacpp.avcodec$AVPacket.<clinit>(avcodec.java:1407)
E/AndroidRuntime:     at org.bytedeco.javacv.FFmpegFrameRecorder.<init>(FFmpegFrameRecorder.java:149)
E/AndroidRuntime:     at com.yceo.anlatbana.GameFragment.initRecorder(GameFragment.java:267)
E/AndroidRuntime:     at com.yceo.anlatbana.GameFragment.onCreate(GameFragment.java:98)
E/AndroidRuntime:     at android.support.v4.app.Fragment.performCreate(Fragment.java:1939)
E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:988)
E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1207)
E/AndroidRuntime:     at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572)
E/AndroidRuntime:     at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:493)
E/AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5310)
E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)

我错过了什么吗?

0 个答案:

没有答案