> For the complete documentation index, see [llms.txt](https://onestore-dev.gitbook.io/dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://onestore-dev.gitbook.io/dev/chi/tools/alc/upgrading-from-v1-to-v2.md).

# Upgrading from V1 to V2

### 由V1升级到 V2 <a href="#id-sheng-ji-dao-alcv2-you-v1-sheng-ji-dao-v2" id="id-sheng-ji-dao-alcv2-you-v1-sheng-ji-dao-v2"></a>

#### 1. 添加ALC Library从属项目 <a href="#id-sheng-ji-dao-alcv21.-tian-jia-alclibrary-cong-shu-xiang-mu" id="id-sheng-ji-dao-alcv21.-tian-jia-alclibrary-cong-shu-xiang-mu"></a>

从 ONE store SDK ALC v2 开始，通过 maven 提供分发。\
通过 maven 应用 SDK，需要应用以下内容。

<br>

**删除ALC AAR 文件**

删除Project内 libs 文件夹的 alc-android-library\_v1.0.0.aar文件

**添加Maven 从属性**

项目顶端的 build.gradle 文件中，注册ONE store maven 地址。

{% hint style="warning" %}
Android Studio (version: bumblebee)，在 settings.gradle添加
{% endhint %}

```gradle

...
buildscript {
repositories {
...
    maven { url 'https://repo.onestore.net/repository/onestore-sdk-public' }
}
}
...
```

<br>

下面应用软件的 build.gradle 文件中，添加 ONE store ALC Library从属项目&#x20;

```gradle

...
dependencies {
def onestore_sdk_version = "2.0.0"
implementation "com.onestorecorp.sdk:sdk-licensing:$onestore_sdk_version"
}
...
```

<br>

**AndroidManifest.xml中添加queries**&#x20;

以下两种情况，请参考ONE store 公告进行设置。

* [Target SDK 版本设置为 30(OS 11) 以上](https://dev.onestore.co.kr/devpoc/support/news/noticeView.omp?pageNo=4\&noticeId=32968\&viewPageNo=\&searchValue=)
* [Target SDK 版本设置为 31(OS 12) 以上](https://dev.onestore.co.kr/devpoc/support/news/noticeView.omp?pageNo=1\&noticeId=33072\&viewPageNo=\&searchValue=)

<br>

Android 11 (Target SDK 30) 以上，请添加以下内容

{% hint style="warning" %}
Android 11 以上 (Target SDK 30 以上)，请添加 queries
{% endhint %}

```xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dev.sample">
<queries>
<intent>
<action android:name="com.onestore.extern.licensing.LicensingService.ACTION" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="onestore" />
</intent>
</queries>
...
```

<br>

#### 2. 添加SDK Configuration  <a href="#id-sheng-ji-dao-alcv22.-tian-jia-sdkconfiguration" id="id-sheng-ji-dao-alcv22.-tian-jia-sdkconfiguration"></a>

在ALC v2中，为使用SDK所需的必要param，必须先应用sdk-configuration Library.\
为应用此功能，请在 build.gradle文件中添加ONE store sdk-configuration Library从属项目。

```gradle

...
dependencies {
def onestore_configuration_version = "1.0.0"
implementation "com.onestorecorp.sdk:sdk-configuration-kr:$onestore_configuration_version"
}
...
```

<br>

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://onestore-dev.gitbook.io/dev/chi/tools/alc/upgrading-from-v1-to-v2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
