package com.android.simple;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import io.dcloud.PandoraEntry;
import io.dcloud.PandoraEntryActivity;
import io.dcloud.feature.internal.sdk.SDK;
public class MainActivity3 extends PandoraEntryActivity implements View.OnClickListener {
Button testbt;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main3);
testbt =findViewById(R.id.test);
testbt.setOnClickListener(this);
// Intent intent =new Intent(this,MainActivity.class);
// startActivity(intent);
}
@Override
public void onClick(View view) {
switch (view.getId()){
case R.id.test:
Intent intent = new Intent(this, PandoraEntry.class);
startActivity(intent);
}
}
}
<activity
android:name="io.dcloud.PandoraEntry"
android:configChanges="orientation|keyboardHidden|keyboard|navigation"
android:hardwareAccelerated="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="user"
android:theme="@style/TranslucentTheme"
android:windowSoftInputMode="adjustResize"
tools:ignore="DuplicateActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
使用默认的activity作为入口就没有问题。
报错信息如下
2022-03-31 00:14:39.760 1979-1979/com.android.simple E/WeexCore: wx_bridge.cpp:1314,class Name is com/taobao/weex/bridge/WXBridge
2022-03-31 00:14:39.760 1979-2223/com.android.simple E/weex: [WXBridgeManager] invoke execJSService: framework.js uninitialized.
2022-03-31 00:14:39.760 1979-1979/com.android.simple E/WeexCore: WXBridge_jni.h:1449,Java_WXBridge_reset_clazz class Name is com/taobao/weex/bridge/WXBridge
1 个回复
DCloud_Android_ST
官方并没有这样的教程。更不推荐开发者自行按自己的理解调整页面跳转逻辑。导致出现问题很难排查。