Code Monkey home page Code Monkey logo

Comments (11)

0x5e avatar 0x5e commented on July 26, 2024

这份文件完整吗,正常的应该是manifest为根节点才对吧

from react-native-alipay.

django-wong avatar django-wong commented on July 26, 2024

对,我没有复制xml和manifest节点

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.cagestsapp"
    android:versionCode="1"
    android:versionName="1.0" >
    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="22" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

    <activity
        android:name="com.alipay.sdk.app.H5PayActivity"
        android:configChanges="orientation|keyboardHidden|navigation|screenSize"
        android:exported="false"
        android:screenOrientation="behind"
        android:windowSoftInputMode="adjustResize|stateHidden" >
    </activity>
    <activity
        android:name="com.alipay.sdk.app.H5AuthActivity"
        android:configChanges="orientation|keyboardHidden|navigation"
        android:exported="false"
        android:screenOrientation="behind"
        android:windowSoftInputMode="adjustResize|stateHidden" >
    </activity>

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <application
        android:name="com.cagestsapp.MainApplication"
        android:allowBackup="true"
        android:debuggable="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.cagestsapp.MainActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustResize" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
    </application>
</manifest>

from react-native-alipay.

django-wong avatar django-wong commented on July 26, 2024

我把node_modules/@0x5e/react-native-alipay/android/src/main/AndroidManifest.xml这个文件中的两个activity节点剪切android/app/src/main/AndroidManifest.xmlapplication节点就好了。

没开发过Android,不确定这样有没有别的隐患,而且显然每次更新npm包都需要再操作一遍。

from react-native-alipay.

0x5e avatar 0x5e commented on July 26, 2024

你的gradle版本是多少,是用android studio在编译吗?
另外有没有用到别的三方rn库,我这个库的包名应该改一下的,com.reactlibrary不知道是不是这个产生冲突了

from react-native-alipay.

django-wong avatar django-wong commented on July 26, 2024

用的是gradle3.0.1,Android Studio版本也是3.0.1
全局搜了一下,com.reactlibrary 这个名字只有0x5e/react-native-alipay在用。
用的其他包有:
"shoutem/ui": "^0.23.4"
"mobx-react": "^4.3.5"
"react-native-elements": "^0.19.0"
"react-native-i18n": "^2.0.10"
"react-native-qrcode-svg": "^5.0.6"
"react-native-storage": "^0.2.2"
"react-native-svg": "^6.0.1-rc.3"
"react-native-vector-icons": "^4.5.0"
"react-native-wechat": "^1.9.9"

from react-native-alipay.

0x5e avatar 0x5e commented on July 26, 2024

用2.x的gradle试一下呢?我现在电脑里没有安卓环境。。

from react-native-alipay.

wohaiwo avatar wohaiwo commented on July 26, 2024

react-native-alipay sdk 问题

  • ios 出现 duplicate symbol OBJC_METACLASS$_UTDIDStringUtils in: libAlipaySDK.a
    34 duplicate symbols for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    去 蚂蚁金服官网 蚂蚁金服SDK下载 下载 sdk (适用于集成了百川 sdk,出现 UTDID 冲突)的版本 放到 node_modules => @0x5e/react-native-alipay 替换 ios sdk 文件
  • android 出现 not found 问题
    在 node_modules => @0x5e/react-native-alipay android - AndroidManifest.xml 中 将 <activity> 包裹于 <application>下面

from react-native-alipay.

0x5e avatar 0x5e commented on July 26, 2024

@wohaiwo 问题一和 #9 类似,有人需要UTDID版本,有人需要无UTDID版本,暂无两全方案;
问题二,欢迎提交PR

from react-native-alipay.

zacksleo avatar zacksleo commented on July 26, 2024

https://stackoverflow.com/questions/46948498/android-studio-3-0-manifest-error-unknown-element-action-found

看样子是 activity 节点所在位置不对

from react-native-alipay.

0x5e avatar 0x5e commented on July 26, 2024

@zacksleo 麻烦用develop分支试试,alipay sdk已经更新成aar了,没有activity节点了😄

from react-native-alipay.

zacksleo avatar zacksleo commented on July 26, 2024
Download https://jcenter.bintray.com/com/tencent/mm/opensdk/wechat-sdk-android-without-mta/maven-metadata.xml
Download https://jcenter.bintray.com/com/tencent/mm/opensdk/wechat-sdk-android-without-mta/5.1.6/wechat-sdk-android-without-mta-5.1.6.pom
:react-native-gesture-handler:compileReleaseAidl
:react-native-picker:compileReleaseAidl
:react-native-webview:compileReleaseAidl
:react-native-wechat:compileReleaseAidl
:app:compileReleaseAidl
:react-native-gesture-handler:packageReleaseRenderscript NO-SOURCE
:react-native-picker:packageReleaseRenderscript NO-SOURCE
:react-native-webview:packageReleaseRenderscript NO-SOURCE
:react-native-wechat:packageReleaseRenderscript NO-SOURCE
:app:compileReleaseRenderscript
:app:checkReleaseManifest
:app:generateReleaseBuildConfig
:app:prepareLintJar UP-TO-DATE
:app:mainApkListPersistenceRelease
:app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
fs.js:1384
    throw error;
    ^

Error: watch /builds/moguyun/app/lipstick/.gradle/wrapper/dists/gradle-4.4-all/9br9xq1tocpiv8o6njlyu5op1/gradle-4.4/samples/native-binaries/tool-chains/src/main/cpp ENOSPC
    at _errnoException (util.js:992:11)
    at FSWatcher.start (fs.js:1382:19)
    at Object.fs.watch (fs.js:1408:11)
    at NodeWatcher.watchdir (/builds/moguyun/app/lipstick/node_modules/sane/src/node_watcher.js:175:20)
    at Walker.<anonymous> (/builds/moguyun/app/lipstick/node_modules/sane/src/common.js:116:12)
    at emitTwo (events.js:126:13)
    at Walker.emit (events.js:214:7)
    at /builds/moguyun/app/lipstick/node_modules/walker/lib/walker.js:69:16
    at go$readdir$cb (/builds/moguyun/app/lipstick/node_modules/graceful-fs/graceful-fs.js:162:14)
    at FSReqWrap.oncomplete (fs.js:135:15)
:app:bundleReleaseJsAndAssets FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'node'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 34s
46 actionable tasks: 44 executed, 2 up-to-date
ERROR: Job failed: exit code 1

试了一下,出现错误,这是什么原因呢?

from react-native-alipay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.