방금 Android Studio에 렌더 스크립트를 시작했습니다. .rs 파일을 만들면 ScriptC_DS 클래스와 .bc 파일이 생성되지 않습니다. 나는 그것이 .rs 파일이 저장되면 자동 생성되도록되어 있으므로 무엇이 잘못 될지 확신하지 못한다고 읽었습니다..rs 파일을 만든 후 ScriptC_ "name"이 생성되지 않습니다 (Android Studio with Gradle)
DS.rs
#pragma version(1)
#pragma rs java_package_name(com.example.DSing)
void root(){
}
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.DSing"
minSdkVersion 16
targetSdkVersion 20
versionCode 1
versionName "1.0"
renderscriptTargetApi 18
renderscriptSupportMode true
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
MainActivity 클래스는 현재 (옆으로 자동 기본값을 생성에서) 아무 상관이없는,하지만 난 개인 ScriptC_DS를 만들려고 할 때 내부에서 "ScriptC_DS 기호를 해결할 수 없습니다"라는 메시지가 나타납니다. MainActivity
package com.example.DSing
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.support.v8.renderscript.*;
public class Main extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
private ScriptC_DS test;
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
질문 : 내가 잘못 뭐하는 거지?
RenderScript 소스는 어디에 있습니까? –
@LarrySchiefer 폴더는 app/src/main/java/com.example.DS /에 있습니다. 거기에 .rs 파일과 내 MainActivity 클래스가 있습니다. – David