source: https://codelabs.developers.google.com/codelabs/android-studio-jni/index.html?index=..%2F..%2Findex#1
2. Create Java Sample App
- Find and start Android Studio on your development system:
- Linux: Run
studio.sh
from your installed location - OSX: Find studio installation in Application folder, double click to start
If this is the first time you run this version of Android Studio on this system, Android Studio will prompt to import from previous settings, just select “I do not have a previous version of Studio or I do not want to import my settings”, “Welcome to Android Studio” will be displayed.
- Select “Start a new Android Studio project”.
- On “New Project” page, change “Application Name” to HelloAndroidJni, and leave the default values for other fields.
- Click “Next” all the way to “Finish” to complete application creation.
This creates an Android “Hello World” Java app; your Android Studio looks like: - (Optional) Connect your Android Device with USB cable if you have device available; otherwise, create an Emulator when Android Studio prompts you in the next step.
- Sync , Build and Run , you will see the following on your target device or Emulator:
- Configure the project to use gradle wrapper.
a) On Mac OS, menu “Android Studio” > “Preferences”.
b) On Linux, menu “File” > “Settings”.
c) Then “Build, Execution, Deployment” > “Build Tools” > “Gradle”.
d) Select “Use Default Gradle wrapper (recommended)”, click “OK”.
- Sync , Build and Run , you should see the same as in step 6.
No comments:
Post a Comment