因为我是反应原生的新手,所以如果步骤中有任何错误,请告诉我.
我根据文档使用命令构建了一个react native android应用程序
react-native android
在设备上运行时,使用了以下命令
react-native run-android
这给了我在我的projectfolder/android/app/build/outputs/apk中输出的2个apk文件
现在,当我在安装后使用安装这个apk时,它要求开发服务器连接到捆绑JS.但我的要求是,用户不需要为开发服务器而烦恼,只需要安装apk即可完成所有操作.
已经完成了一些stackoverflow问题但没有帮助构建不需要开发服务器的unsigned apk.
你能帮助我找到如何在反应原生中构建和未签名的apk的方法吗?
如果权限没有变化,请自动播放存储更新应用.但skype要求我更新应用程序,当我点击更新按钮时,我发现了这个弹出窗口.
因此,如果没有更改权限,那么为什么播放商店会显示此对话框.
实际上我开发了一个应用程序,并在该应用程序中,我没有更改任何权限,并得到相同的对话框,检查他们的文档相关的自动更新,但没有找到任何东西.
我需要休息api来创建磁铁客户,因为我遵循了这个教程http://www.authenticdesign.co.uk/extending-magento-rest-api-v2/
我一步一步地跟着它,但是当我在休息客户端测试api时,它给了我: {"messages":{"error":[{"code":404,"message":"Request does not match any route."}]}}
我不知道我在哪里弄错了.帮帮我,因为我对magento和php都很新.
步骤是:
1.在(app/etc/module/Custom_Restapi.xml)启用扩展
<config>
<modules>
<Custom_Restapi>
<active>true</active>
<codePool>local</codePool>
</Custom_Restapi_Groups>
</modules>
</config>
Run Code Online (Sandbox Code Playgroud)
2. config.xml at(app/code/local/Custom/Restapi/etc/config.xml)
<?xml version="1.0"?>
<config>
<modules>
<Custom_Restapi>
<version>0.1.0.0</version>
</Custom_Restapi>
</modules>
<global>
<models>
<restapi>
<class>Custom_Restapi_Model</class>
</restapi>
</models>
</global>
</config>
Run Code Online (Sandbox Code Playgroud)
3. api2.xml at(app/code/local/Custom/Restapi/etc/api2.xml)
<?xml version="1.0"?>
<config>
<api2>
<resource_groups>
<restapi translate="title" module="Custom_Restapi">
<title>Custom Rest API</title>
<sort_order>10</sort_order>
</restapi>
</resource_groups>
<resources>
<restapi translate="title" module="Custom_Restapi">
<group>restapi</group>
<model>restapi/api2_restapi</model>
<title>Testing My Rest API</title>
<sort_order>10</sort_order>
<privileges>
<admin>
<create>1</create>
</admin>
</privileges>
<attributes translate="" module="Custom_Restapi">
<firstname>First Name</firstname>
<lastname>Last Name</lastname>
<email>Email</email> …
Run Code Online (Sandbox Code Playgroud) Windows 7,Android Studio 2.3
我有3个模拟器.所有成功都从Android Studio开始.
但我想从命令行启动它们.所以我的步骤(来自命令行):
成功展示了我所有的模拟器:
所以我想开始其中一个:
模拟器-avd Nexus_3_7_API_17_ver_4_2_1
但我得到错误:
[8648]:ERROR:./android/qt/qt_setup.cpp:28:Qt library not found at ..\emulator\lib64\qt\lib
Could not launch '..\emulator/qemu/windows-x86_64/qemu-system-i386.exe': No such file or directory
Run Code Online (Sandbox Code Playgroud) 这个问题已经问到了,但我没有找到任何满意的答案.
我按照https://developers.google.com/+/mobile/android/samples/quickstart-android#credentials-screenshot的每一步进行操作,但不是他们使用我的包名.
有两种情况,一种是直接测试,另一种是使用密钥库登录apk.
当我在这种情况下测试我的应用程序时,使用任何谷歌帐户工作正常,但在我生成我之后signed apk
它给了我Error signing in the specified account. Please choose a different account
.
如果一切都相同那么为什么它不合作signed apk
?
我正在使用提供 mov/mp4 流的 ip cam。我使用以下命令成功保存流:
ffmpeg -i rtsp://@192.168.241.1:62156/abc.mp4 -acodec copy -vcodec copy c:/abcd.mp4
现在我想以编程方式停止它,因为我使用了以下命令:
Ctrl+C
并且q
两者都工作正常(日志以正确的方式显示),但最终我得到了损坏的视频文件。
任何人都可以指导我如何以干净的执行方式停止录制。
我如何知道 Android 中最后一次使用某个应用程序的时间?这个可以确定吗?以及如何获取上次使用日期?
我在OnCreate方法中使用ViewTreeObserver来获取我的工具栏和底部布局的高度,但我仍然得到0高度,为什么?难道我做错了什么?
这是我打电话的方式:
ViewTreeObserver viewTreeObserver = toolbar.getViewTreeObserver();
viewTreeObserver.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
@Override
public void onGlobalLayout() {
// Ensure you call it only once :
toolbar.getViewTreeObserver().removeOnGlobalLayoutListener(this);
height1 = toolbar.getMeasuredHeight();
}
});
final LinearLayout linearLayout = (LinearLayout) findViewById(R.id.bottom);
ViewTreeObserver vto = linearLayout.getViewTreeObserver();
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
@Override
public void onGlobalLayout() {
// Ensure you call it only once :
linearLayout.getViewTreeObserver().removeOnGlobalLayoutListener(this);
height2 = linearLayout.getMeasuredHeight();
}
});
Toast.makeText(getApplicationContext(), String.valueOf(height1) + String.valueOf(height2), Toast.LENGTH_SHORT).show();
Run Code Online (Sandbox Code Playgroud) 我想知道如何比较数组列表中的所有数组列表元素?例如,我想比较最大数字的元素。就像比较第 1 个元素和第 2 个元素一样,第 2 个元素与第 3 个元素进行比较。怎么做?
List <Product> productList= new ArrayList<>();
Run Code Online (Sandbox Code Playgroud)
谁能举例说明如何与这个变量进行比较?
productList.get(i).getPrice()
Run Code Online (Sandbox Code Playgroud)
感谢帮助。
大家好,请建议我如何创建Android xml drawable像下面的图像?
现在我使用下面的代码
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<rotate
android:fromDegrees="45"
android:pivotX="-40%"
android:pivotY="87%"
android:toDegrees="45">
<shape android:shape="rectangle">
<stroke
android:width="10dp"
android:color="@color/colorAccent" />
<solid android:color="@color/colorAccent" />
</shape>
</rotate>
</item>
</layer-list>
Run Code Online (Sandbox Code Playgroud)
但它的结果是三角形,但我需要上面的形状.
我目前有这个标签视图,我在本教程中遵循了这个视图.一切正常,直到我注意到onCreateView
没有在任何标签上调用.我在这里和那里寻找解决方案,但我仍然无法解决.这是我的代码:
activity_pref_main_container.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/main_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".PrefActivityMain">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="?attr/colorPrimary"
android:elevation="6dp"
android:minHeight="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
<android.support.design.widget.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/toolbar"
android:background="?attr/colorPrimary"
android:elevation="6dp"
android:minHeight="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_below="@id/tab_layout"/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
PrefMainActivity.class
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pref_main_container);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar.setTitle(R.string.preference_title);
setSupportActionBar(toolbar);
new PrefActivityListAsync(this,this,specialization).execute();
new PrefActivityListAsync(this,this,position).execute();
new PrefActivityListAsync(this,this,type).execute();
TabLayout tabLayout = (TabLayout) findViewById(R.id.tab_layout);
tabLayout.addTab(tabLayout.newTab().setText("Specialization"));
tabLayout.addTab(tabLayout.newTab().setText("Position"));
tabLayout.addTab(tabLayout.newTab().setText("Type"));
tabLayout.setTabGravity(TabLayout.GRAVITY_FILL);
final ViewPager viewPager = (ViewPager) …
Run Code Online (Sandbox Code Playgroud) android android-fragments android-tablayout fragment-oncreateview
public interface List扩展Collection
Collection是一个接口,而不是List扩展它而不是实现?
android ×10
api ×1
apk ×1
arraylist ×1
collections ×1
command-line ×1
compare ×1
ffmpeg ×1
google-play ×1
google-plus ×1
java ×1
list ×1
magento ×1
php ×1
react-native ×1
rest ×1
rtsp ×1
shape ×1
video ×1
xml ×1