Set-up RenderScript in Android Studio

后端 未结 2 1222
既然无缘
既然无缘 2021-01-03 16:40

I\'m desperately trying to set-up RenderScript in Android Studio. According to this manual http://developer.android.com/guide/topics/renderscript/compute.html#ide-setup I ha

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-03 17:15

    1. Open Android Studio.
    2. Select "File/New/New Project..."
    3. Press Next
    4. Select "Phone and Tablet" and Minimum SDK: 4.4.
    5. Press Next.
    6. Select "Blank Activity".
    7. Press Next.
    8. Press Finish.
    9. Right-click at the top of hierarchy tree on the left ("app").
    10. Select "New/Folder/RenderScript folder".
    11. Press Finish.
    12. Copy a working renderscript file to newly created "rs" folder.
    13. Double-click on "Gradle Scripts/build.gradle (Module: app).
    14. Insert

      renderscriptTargetApi 18
      renderscriptSupportModeEnabled true
      

    at the end of defaultConfig section.

    1. Press Ctrl-F9 to build your project.

提交回复
热议问题