debug: expo-updates ENABLED_IN_DEVELOPMENT尝试(debug禁用+release缺AAR)
- debug manifest: 添加ENABLED_IN_DEVELOPMENT=true(无效,SDK内置检查绕过) - 根因: expo-updates在BuildConfig.DEBUG时禁用,无法从meta覆盖 - release构建缺react-android-0.76.5-release.aar(npm不提供) - 热更新需eas build云端构建或Android Studio release配置
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +1,2 @@
|
|||||||
#Mon Jul 20 23:15:14 CST 2026
|
#Tue Jul 21 00:19:27 CST 2026
|
||||||
gradle.version=8.10.2
|
gradle.version=8.10.2
|
||||||
|
|||||||
Binary file not shown.
@@ -3,5 +3,7 @@
|
|||||||
|
|
||||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||||
|
|
||||||
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" tools:replace="android:usesCleartextTraffic" />
|
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" tools:replace="android:usesCleartextTraffic">
|
||||||
|
<meta-data android:name="expo.modules.updates.ENABLED_IN_DEVELOPMENT" android:value="true" />
|
||||||
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -5,24 +5,38 @@ var AppRegistry = require("react-native").AppRegistry;
|
|||||||
var Updates = require("expo-updates");
|
var Updates = require("expo-updates");
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
var [status, setStatus] = React.useState("loading...");
|
var [msg, setMsg] = React.useState("checking...");
|
||||||
|
|
||||||
React.useEffect(function() {
|
React.useEffect(function() {
|
||||||
|
async function check() {
|
||||||
try {
|
try {
|
||||||
var info = "runtime: " + Updates.runtimeVersion + "\n";
|
var rv = Updates.runtimeVersion || "empty";
|
||||||
info += "channel: " + (Updates.channel || "default") + "\n";
|
var ch = Updates.channel || "default";
|
||||||
info += "updateId: " + (Updates.updateId || "none") + "\n";
|
var id = Updates.updateId || "none";
|
||||||
info += "isEmbedded: " + Updates.isEmbeddedLaunch;
|
var emb = Updates.isEmbeddedLaunch ? "embedded" : "not-embedded";
|
||||||
setStatus(info);
|
var info = "rv=" + rv + " ch=" + ch + " id=" + id + " emb=" + emb;
|
||||||
} catch(e) {
|
|
||||||
setStatus("Error: " + e.message);
|
var result = await Updates.checkForUpdateAsync();
|
||||||
|
if (result.isAvailable) {
|
||||||
|
info += "\nUPDATE AVAILABLE! downloading...";
|
||||||
|
await Updates.fetchUpdateAsync();
|
||||||
|
info += "\ndownloaded. Restart app.";
|
||||||
|
await Updates.reloadAsync();
|
||||||
|
} else {
|
||||||
|
info += "\nno update available";
|
||||||
}
|
}
|
||||||
|
setMsg(info);
|
||||||
|
} catch(e) {
|
||||||
|
setMsg("Error: " + e.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
check();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return React.createElement(View, {style: {flex:1,backgroundColor:"#0f172a",alignItems:"center",justifyContent:"center"}},
|
return React.createElement(View, {style: {flex:1,backgroundColor:"#0f172a",alignItems:"center",justifyContent:"center"}},
|
||||||
React.createElement(Text, {style: {fontSize:28,fontWeight:"800",color:"#e2e8f0"}}, "Yuzu GCA"),
|
React.createElement(Text, {style: {fontSize:28,fontWeight:"800",color:"#e2e8f0"}}, "Yuzu GCA"),
|
||||||
React.createElement(Text, {style: {fontSize:14,color:"#64748b",marginTop:8}}, "v0.1.0-dav-android-10"),
|
React.createElement(Text, {style: {fontSize:14,color:"#64748b",marginTop:8}}, "v0.1.0-dav-android-10"),
|
||||||
React.createElement(Text, {style: {fontSize:10,color:"#3b82f6",marginTop:8,textAlign:"center"}}, status)
|
React.createElement(Text, {style: {fontSize:10,color:"#3b82f6",marginTop:8,textAlign:"center"}}, msg)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
screen2.png
Normal file
BIN
screen2.png
Normal file
Binary file not shown.
Reference in New Issue
Block a user