Change the NDK samples package names to be lower case. Also added minSdkVersion=3 in the manifests.
This commit is contained in:
@@ -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">
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -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" />
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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 !");
|
||||||
|
|||||||
@@ -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 */
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user