Change the NDK samples package names to be lower case. Also added minSdkVersion=3 in the manifests.

This commit is contained in:
Xavier Ducrohet
2009-05-07 14:03:22 -07:00
parent f2b70edc0d
commit f99249b80b
7 changed files with 14 additions and 12 deletions

View File

@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.HelloJni" package="com.example.hellojni"
android:versionCode="1" android:versionCode="1"
android:versionName="1.0"> android:versionName="1.0">
<uses-sdk android:minSdkVersion="3" />
<application android:label="@string/app_name"> <application android:label="@string/app_name">
<activity android:name=".HelloJni" <activity android:name=".HelloJni"
android:label="@string/app_name"> android:label="@string/app_name">

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.example.HelloJni; package com.example.hellojni;
import android.app.Activity; import android.app.Activity;
import android.widget.TextView; import android.widget.TextView;

View File

@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.TwoLib" package="com.example.twolibs"
android:versionCode="1" android:versionCode="1"
android:versionName="1.0"> android:versionName="1.0">
<uses-sdk android:minSdkVersion="3" />
<application android:label="@string/app_name"> <application android:label="@string/app_name">
<activity android:name=".TwoLib" <activity android:name=".TwoLibs"
android:label="@string/app_name"> android:label="@string/app_name">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View File

@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.example.TwoLib; package com.example.twolibs;
import android.app.Activity; import android.app.Activity;
import android.widget.TextView; import android.widget.TextView;
import android.os.Bundle; import android.os.Bundle;
public class TwoLib extends Activity public class TwoLibs extends Activity
{ {
/** Called when the activity is first created. */ /** Called when the activity is first created. */
@Override @Override

View File

@@ -24,7 +24,7 @@
* apps/samples/hello-jni/project/src/com/example/HelloJni/HelloJni.java * apps/samples/hello-jni/project/src/com/example/HelloJni/HelloJni.java
*/ */
jstring jstring
Java_com_example_HelloJni_HelloJni_stringFromJNI( JNIEnv* env, Java_com_example_hellojni_HelloJni_stringFromJNI( JNIEnv* env,
jobject thiz ) jobject thiz )
{ {
return (*env)->NewStringUTF(env, "Hello from JNI !"); return (*env)->NewStringUTF(env, "Hello from JNI !");

View File

@@ -1,6 +1,6 @@
#ifndef FIRST_H #ifndef FIRST_H
#define FIRST_H #define FIRST_H
extern int first(int x, int y); extern int first(int x, int y);
#endif /* FIRST_H */ #endif /* FIRST_H */

View File

@@ -2,10 +2,10 @@
#include <jni.h> #include <jni.h>
jint jint
Java_com_example_TwoLib_TwoLib_add( JNIEnv* env, Java_com_example_twolibs_TwoLibs_add( JNIEnv* env,
jobject this, jobject this,
jint x, jint x,
jint y ) jint y )
{ {
return first(x, y); return first(x, y);
} }