react native ios打包 编译成功 Archive失败报错问题
报错问题如下: Invalid bitcode version (Producer: '902.0.39.1_0' Reader: '900.0.37_0')', using libLTO version 'LLVM version 9.0.0, (clang-900.0.37)' for architecture arm64 具体解决办法 image.png
[1].Fragment静态使用
[2].Fragment动态使用
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:orientation="vertical" >
<TextView
android:id="@+id/blue_tv"
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="蓝色Fragment"
/>
</RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/yellow"
android:orientation="vertical" >
<TextView
android:id="@+id/yellow_tv"
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="黄色Fragment"
/>
</RelativeLayout>
/**
* 作者:张风捷特烈<br/>
* 时间:2018/8/28 0028:13:07<br/>
* 邮箱:1981462002@qq.com<br/>
* 说明:黄色Fragment
*/
public class YellowFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.yellow, container, false);
}
}
/**
* 作者:张风捷特烈<br/>
* 时间:2018/8/28 0028:13:07<br/>
* 邮箱:1981462002@qq.com<br/>
* 说明:绿色Fragment
*/
public class BlueFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_bottom, container, false);
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".activity.ActFragmentActivity">
<fragment
android:id="@+id/yellow_fragment1"
android:name="com.toly1994.avi_fragment.staticFg.YellowFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
<View
android:background="@color/gray_8f"
android:layout_width="match_parent"
android:layout_height="1dp"/>
<fragment
android:id="@+id/yellow_fragment2"
android:name="com.toly1994.avi_fragment.staticFg.YellowFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
<fragment
android:id="@+id/blue_fragment"
android:name="com.toly1994.avi_fragment.staticFg.BlueFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="4"/>
</LinearLayout>
public class StaticFragmentActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_static);
}
}
public class ActFragmentActivity extends FragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_acti);
initFragment();
}
/**
* 动态加载Fragment
*/
private void initFragment() {
FragmentManager fm = getFragmentManager();//1.获取FragmentManager
FragmentTransaction ft = fm.beginTransaction();//2.fm开启事务
//3.动态添加 (控件id,fragment对象)
ft.add(R.id.fl_title, new YellowFragment());
ft.add(R.id.fl_content, new BlueFragment());
ft.commit();//4.提交事务
}
}
[1]本文由张风捷特烈原创,转载请注明
[2]欢迎广大编程爱好者共同交流
[3]个人能力有限,如有不正之处欢迎大家批评指证,必定虚心改正
[4]你的喜欢与支持将是我最大的动力
更多安卓技术欢迎访问:安卓技术栈
我的github地址:欢迎star
简书首发,腾讯云+社区同步更新
张风捷特烈个人网站,编程笔记请访问:http://www.toly1994.com
QQ:1981462002
邮箱:1981462002@qq.com
微信:zdl1994328
微信关注我们
转载内容版权归作者及来源网站所有!
低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。
Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。
Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。
Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。