maitrungduc1410 / react-native-zalo-kit

Zalo SDK implementation for React Native
MIT License
44 stars 11 forks source link

Không xuất file apk được #87

Open HoangTrongKhanh opened 1 month ago

HoangTrongKhanh commented 1 month ago

chạy lệnh ./gradlew assembleRelease thì lỗi: _../node_modules/react-native-zalo-kit/android/build/intermediates/mergedres/release/values/values.xml:3238: AAPT: error: resource android:attr/lStar not found.

React-Native Info System: OS: macOS 14.4.1 CPU: (8) arm64 Apple M1 Pro Memory: 74.50 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 18.20.2 path: ~/.nvm/versions/node/v18.20.2/bin/node Yarn: version: 1.22.22 path: ~/.nvm/versions/node/v18.20.2/bin/yarn npm: version: 10.5.0 path: ~/.nvm/versions/node/v18.20.2/bin/npm Watchman: version: 2024.04.22.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /Users/hoangkhanh/.gem/ruby/3.1.3/bin/pod SDKs: iOS SDK: Platforms:

NgocLe1001 commented 1 month ago

https://github.com/maitrungduc1410/react-native-zalo-kit/issues/84#issuecomment-2058836780 bạn update theo này xem. mình build apk được nhưng lỗi zalo trả ra

maitrungduc1410 commented 1 month ago

Để mình thử build release và nhắn các b nhé

NgocLe1001 commented 1 month ago

Để mình thử build release và nhắn các b nhé

 Cảm ơn bạn nhé ạ

maitrungduc1410 commented 1 month ago

Mình đã thử và vẫn build bình thường cho android release nhé, command:

npx react-native build-android --mode=release
Screenshot 2024-05-10 at 10 43 10 AM

package.json của mình:

"react": "18.2.0",
"react-native": "0.74.0",
"react-native-zalo-kit": "^4.0.5"
maitrungduc1410 commented 1 month ago

Hình như có người bị tương tự, cần phải update compileSdkVersiontargetSdkVersion lên cao hơn: https://stackoverflow.com/a/69050529/7569705

HoangTrongKhanh commented 1 month ago

Mình đã thử và vẫn build bình thường cho android release nhé, command:

npx react-native build-android --mode=release
Screenshot 2024-05-10 at 10 43 10 AM

package.json của mình:

"react": "18.2.0",
"react-native": "0.74.0",
"react-native-zalo-kit": "^4.0.5"

Chạy lệnh gradlew assembleRelease thử xem

maitrungduc1410 commented 1 month ago

build thành công nhé b:

Screenshot 2024-05-11 at 1 14 28 AM

cách làm như mình đã nói, cần phải update compileSdk: ở android/build.gradle > buildscript.ext thêm vào như sau:

buildscript {
    ext {
        ...
        ZaloKit_compileSdkVersion = 31
    }
NgocLe1001 commented 1 month ago

ZaloKit_compileSdkVersion

image
NgocLe1001 commented 1 month ago

@maitrungduc1410 ế bạn ơi. được rồi nhé. nhưng magic lắm "react-native": "0.73.6",

buildscript {
    ext {
        ...
        ZaloKit_compileSdkVersion = 31
    }
}

Hôm nọ mình để lên 33, thì vẫn lỗi, nay để 31 thì được. Nhưng mình vẫn thấy 2 hash key cho release với develop là khác nhau, mình phải add cả 2 lên zalo developer Thực sự cảm ơn bạn đã support nhiều.

maitrungduc1410 commented 1 month ago

Oke b nhé, fix đc là tốt r, mình sẽ ghim issue này lên cho mn về sau đc biết