CreateProcess error=2, 系统找不到指定的文件。 Execution failed for task ':libuvccamera:ndkBuild'. A problem occurred starting process 'command 'null/ndk-build.cmd''
Execution failed for task ':libuvccamera:ndkBuild'. Process 'command 'G:\win7\developSoftware\androidSDK\ndk\21.0.6113669/ndk-build.cmd'' finished with non-zero exit value 2
解决方法:
打开Application.mk,修改APP_ABI,
修改前 APP_ABI := armeabi armeabi-v7a x86 mips
修改后 APP_ABI := armeabi-v7a x86
第四个错误:
1 2 3 4 5 6
Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:354) at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:323) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at com.serenegiant.usbcameratest.MainActivity.onCreate(MainActivity.java:61)
Caused by: android.view.InflateException: Binary XML file line #32 in com.serenegiant.usbcameratest:layout/activity_main: Binary XML file line #32 in com.serenegiant.usbcameratest:layout/activity_main: Error inflating class com.serenegiant.widget.SimpleUVCCameraTextureView Caused by: android.view.InflateException: Binary XML file line #32 in com.serenegiant.usbcameratest:layout/activity_main: Error inflating class com.serenegiant.widget.SimpleUVCCameraTextureView Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at android.view.LayoutInflater.createView(LayoutInflater.java:858) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1010) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1127) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088) at android.view.LayoutInflater.inflate(LayoutInflater.java:686) at android.view.LayoutInflater.inflate(LayoutInflater.java:538) at android.view.LayoutInflater.inflate(LayoutInflater.java:481) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at com.serenegiant.usbcameratest.MainActivity.onCreate(MainActivity.java:61) at android.app.Activity.performCreate(Activity.java:7893) at android.app.Activity.performCreate(Activity.java:7880) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3287) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3461) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2048) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:227) at android.app.ActivityThread.main(ActivityThread.java:7573) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:953) Caused by: java.lang.UnsupportedOperationException: TextureView doesn't support displaying a background drawable com.serenegiant.usbcameratest E/AndroidRuntime: at android.view.TextureView.setBackgroundDrawable(TextureView.java:326) at android.view.View.setBackground(View.java:23033) at android.view.View.<init>(View.java:5869) at android.view.View.<init>(View.java:5265) at android.view.TextureView.<init>(TextureView.java:166) at com.serenegiant.widget.SimpleUVCCameraTextureView.<init>(SimpleUVCCameraTextureView.java:50) at com.serenegiant.widget.SimpleUVCCameraTextureView.<init>(SimpleUVCCameraTextureView.java:46)